PDA

View Full Version : Problem connecting to remote database



graciano
15th April 2009, 15:48
Hello
I am using Qt to acces a local MySql Database and it works ok.
The problem is when i change...


db.setHostName("localhost");


... by ...


db.setHostName("192.168.1.100");



What else do i nead?

Thanks

graciano
15th April 2009, 16:49
This might be the reason: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

I will check it as soon as i can get my hands on the server;)

graciano
16th April 2009, 11:59
I changed in /etc/mysql/my.cnf ...
..this line ...


bind-address = 127.0.0.1

...by this line ...


bind-address = 192.168.1.100

... and now...


db.setHostName("192.168.1.100");

... connects as normally.