1) if you want to access the database from you localhost, you definitely need to grant privileges to the specified user @localhost. otherwise, mysql will always check anonymous user at locahost and most likely you will be returned with "cannot access"
2) when you are in a remote machine and you have no connection to mysql. try to use ''telnet sqlhost 3306". if this fails. the mysql server might be deny all access since the default is binding to localhost (127.0.0.1) only, this means it will only accept connections from localhost applications to avoid security hits.
To change that, edit /etc/mysql/my.cnf and comment out the line bind-address = 127.0.0.1:
and restart the mysql server with:
/etc/init.d/mysql restart
No comments:
Post a Comment