Problems installing MySql

Hello everybody, fist of all say that I do not speak english very well, so I hope you can understandme.

I deployed a Linux Ubuntu 12.10 distribution, i install Apache and everything ran well, but when i tried to install MySql im having errors:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I hope you can help me.

Thank you very much.

3 Replies

How exactly did you install "mysql" ?

Install MySql as follows:

$ sudo apt-get install mysql-server

Then try also with aptitude:

$ sudo aptitude install mysql-server

I hope your help. Thank you very much.

Reading in some forums i found the solution:

1) Uninstall mysql

$ sudo apt-get remove mysql-server

2) Login as root

$ sudo -s

3) Delete /var/lib/mysql

$ rm -r /var/lib/mysql

4) Exit root

$ exit

5) Install Mysql again

$ sudo apt-get install mysql-server

Following all these steps Mysql run ok.

Thank you very much, maybe this can help somebody.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct