My MySQL installation is broken. How to completely reconfigure it?
When i try to login in apache i get a
#2002 error. When i try to login in MySQL via terminal it ask my password and i get:
$ mysql -u root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I tried to remove mysql and install it again and nothing happen ( i cant even remove it) I try to reboot apache but still nothing. I tried to reboot my pc and of course still aint working.
In terminal i get this:
$ sudo start mysql start: Job failed to start $ mysql -ubob -hlocalhost -P3306 -p ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) $ sudo service mysql stop stop: Unknown instance:
Here is my
# * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking
I tried to find if there is a file in my
/var/run/mysqld/ or in
/var/tmp/ and dint find the file mysqld.sock... I looked in
/var/log/mysql/ and don't even have anything in it.
Can you help me? I try to find help on google for hours and din't help at all...
cat /var/log/syslog | grep mysql here
/var/run/mysqld/ exists but it doesn't have anything in it
$ ls -la/var/run/mysqld/ total 0 drwxr-xr-x 2 mysql root 40 Nov 5 22:31 . drwxr-xr-x 25 root root 860 Nov 5 22:32 ..
my ubuntu is 12.04 LTS . can you tell me how can i make backups of my databases too?if you dont have something better then reinstall at least i can backup my databases
i tried to make backup with following:
mysqldump -u root -p –all-databases > all_backup.sql
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket >'/var/run/mysqld/mysqld.sock' (2) when trying to connect