Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) [2002]

Sometime get the following error on MySQL sites and also when trying to access MySQL from server: Solution is very simple: /etc/my.cnf skip-innodb Try to restart MySQL and if it don’t start then use: killall -9 mysqld Assign appropriate permissions to your /tmp directory. # chmod 1777 /tmp After that restart MySQL: service mysql restart Cheers. […]

Continue Reading…

How to reset MySQL root password in linux centos

To Reset your MySQL root password: /etc/init.d/mysqld stop mysql -u root Use mysql; update user set password=(“YOUR_ROOT_PW”) where User=’root’; or /usr/bin/mysqladmin -u root password ‘yourmysqlpassword’ Above command can be used to reset plesk admin password as well. flush privileges; quit /etc/init.d/mysqld stop /etc/init.d/mysqld start mysql -u root -p Done. If you want to reset MySQL […]

Continue Reading…