ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label connect mysql from remote server. Show all posts
Showing posts with label connect mysql from remote server. Show all posts

2009/12/23

“cannot connect to mysql ” in fantastico

If you are getting an error like “cannot connect to mysql ” in fantastico
then check if the soft link is there in /tmp. If there is no softlink.Issue the following command:-

[root@bigboy ~]#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

2009/11/16

How to connect mysql from remote server

mysql -u root -p -h

where remote server = remote server ip address
To enable MySQL to listen to remote connections, you must find your my.cnf file.

find / -name 'my.cnf'

(the global 'my.cnf is' likely to be /etc but it may be found in other places)

Open the file, and put a # in front of skip-networking or bind-address=127.0.0.1

Example of end result:

1. skip-networking

or

1. bind-address = 127.0.0.1


Also check for any firewall stopping port 3306

Restart MySQL and everything should work fine.

Don't forget to grant users access from remote hosts.