I am using ubuntu in VMWare. I installed mysql and have it running. I can login with the user root and a password. I have the IP of the VM box. In my code i wrote
using MySql.Data; return new MySql.Data.MySqlClient.MySqlConnection("username=root;data source=192.168.100.129,password=xyz");
instead of data source i also tried server. I get the exception message Unable to connect to any of the specified MySQL hosts.
i ran netstat -an | grep -i mysql
and saw
unix 2 [ ACC ] STREAM LISTENING 23404 /var/run/mysqld/mysqld.sock
so i added port=23404; and tried both data source
and server
. No luck. I can indeed ping that address on the virtual machine (i got the address using ifconfig). So Whats my problem and how do i connect? This is the first time i am using this. I always used sqlite in the past.