Wednesday, 31 October 2018

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

I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to change password through terminal I get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) How can I fix this? I am unable to open LAMP, uninstall it or reinstall it.  Answers I once had this problem and solved it by installing mysql-server, so make sure that you have installed the mysql-server,...

Mysql: phpmyadmin “no data received to import” error, how to fix?

I am using XAMPP on a pc atwork to host a database. I exported a backup ("bintra.sql") using phpmybackuppro. I use xampp on a mac at home, and when I try to import the sql file located on my desktop, I get this error. No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16. Now, the file size of bintra.sql is 922kb. The max size allowed indicated on the phpmyadmin screen is 3,072KiB, so I don't think it is the size that is preventing...

How to enable MySQL Query Log?

How do I enable the MySQL function that logs each SQL query statement received from clients and the time that query statement has submitted? Can I do that in phpmyadmin or NaviCat? How do I analyse the log?  Answers First, Remember that this logfile can grow very large on a busy server. For mysql < 5.1.29: To enable the query log, put this in /etc/my.cnf in the [mysqld] section log = /path/to/query.log #works for mysql < 5.1.29 Also, to enable it from MySQL console SET general_log...