So, I am running mysql on an ubuntu server (command-line) VirtualBox, on a Windows 7 host. In the Virtual machine, I changed the /etc/mysql/my.cnf file by commenting out the line
bind-address = 127.0.0.1
so it looks like
#bind-address = 127.0.0.1
I then restarted the server like so:
perrin@LinuxServer1:~$ sudo /etc/init.d/mysql restart
[sudo] password for perrin:
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
After this, I started getting this error whenever I try to connect to mysql, like so:
perrin@LinuxServer1:~$ mysql -u root -p
Enter password:
Error 2002 (HY000): Can't connect to local MySQL server through socket '/var/
run/mysqld/mysqld.sock' (2)
I searched for help and found out that my MySQL server was NOT running, even though it had SAID [ OK ]
when starting back up. (lying P.O.S.)
So I try to start it, using both start
and restart
like so:
perrin@LinuxServer1:~$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld [fail]
perrin@LinuxServer1:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
So I go back to the my.cnf and un-comment the bind-address = 127.0.0.1
line, so that everything is EXACTLY as it was before, and try again to start/restart the server. It fails again in exactly the same way.
I've searched all over the web for help and found a few SIMILAR problems people were having, but nothing ultimately useful, or that gave me any tips that led to a solution.
Does anyone have any idea what is going on here? I'm stumped.