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?
|