I have been trying to install MySQL on Ubuntu 10.10 and just can't get it to work. I installed it by running sudo apt-get install mysql-server
and once that was done, when I try mysql
I get the message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I tried mysql start
and get the same thing. I am sure I am doing something wrong, any pointers would be great.
To start the mysql demon (or service) you should do:
the old way should still work for now:
But it's quite strange that mysql didn't start while installing. IIRC, it should be started at the end of the installation and autstarted by default with the system. You can check if the server is running using:
You can check for mysql startup errors by looking at the log files. In a terminal, type:
That should let you see the specific errors that are keeping it from running.
To installations of MySQL can specify where we will have the socket for local connections
you have to modify this file (/etc/mysql/my.cnf)
and add the parameter socket in the section client: