Click here to Skip to main content
15,887,966 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have MySQL database server configured on my Linux OS (Fedora Core 10), which was installed using VM Ware. How can I link my C# application running on Visual Studio( Windows) to my database on Linux? Most especially when setting up connection, what will be the source of my database since it is on a "network"?

Thanks
Posted
Updated 24-Nov-10 21:57pm
v2

1 solution

Use the IP address of the Linux VM instance as the Server/Host/DataSource depending on the connection string[^] you are using.
 
Share this answer
 
Comments
HubSnippets 26-Nov-10 7:08am    
I tried it but not working.


SqlConnection datacon = new SqlConnection ("Server = 192.168.0.129; Database = " + firstTry +"; Uid = "+ Admin +"; Pwd = "+ consult2me +";");
Rod Kemp 26-Nov-10 7:47am    
SqlConnection is only used for SQL Server connections NOT MySql for MySql connections refer to the link I provided.
Rod Kemp 26-Nov-10 7:51am    
If you need further information on the MySql Connector look at http://www.mysql.com/products/connector/
markkuk 26-Nov-10 12:01pm    
Remember to change the MySQL configuration to allow network connections and open port 3306 in the Fedora firewall.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900