Error when trying to connect to MySQL Server
Hello,
I am trying to connect to mysql server. I am running Ubuntu Server on VM which is running on Windows. I am getting the following error. Lost connection to MySQL server at 'reading initial communication packet', system error: 111 These are the steps I have done so far. 1. Install mysql 2. Modified the bind-address in /etc/mysql/my.cnf to change to the Ubuntu Server IP. 3. Ran sudo /etc/init.d/mysql restart When I try to access the database via a php connection who's files also sit on this server at /var/www/myfolder. I get the error. Lost connection to MySQL server at 'reading initial communication packet', system error: 111 I have also made changes to a config.php file to match the settings of the sql database. // Database Settings $GLOBALS['database'] = 'dbsv1'; // Enter the name of the database here $GLOBALS['user'] = 'myusername'; // Enter the username for the database $GLOBALS['pass'] = 'mypassword'; // Enter the password for the username $GLOBALS['hostname'] = '192.168.1.1'; // Enter the hostname that is serving the database Any ideas as to why I am getting this error? |
Quote:
Quote:
|
firewall/iptables ?
Can you connect at the cmd line locally and/or remotely? |
Sorry, my bad. I fat fingered the host address in the php file. Now I am getting another error.
Unable to connect: Host 'ubuntu.home' is not allowed to connect to this MySQL server. |
Judging by this thread with me and you
http://www.linuxquestions.org/questi...indows-927752/ can I advice that you pick up some beginner book or a howto to gain some very basic understanding of networking, Apache, MySQL etc. You are getting this error because presumably you failed to grant the appropriate MySQL user the right to connect from wherever you are connecting from. |
All times are GMT -5. The time now is 07:18 PM. |