This issue usually happens after the mysql downgrade from version 5 to 4. The error will be like: ERROR 2002: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) If you check further, you can see charset issue related with mysql (charset #83) in the /var/lib/mysql/HOSTNAME.err file. You can fix this issue by appending the below line in […]
Archive for the ‘Mysql’ Category
How to change the storage engine to InnoDB
1.Edit the /etc/my.cnf file and look for this line: skip-innodb and comment it out: #skip-innodb 2.Add the following entry in the /etc/my.cnf file default-storage_engine = InnoDB 3. Save the file, and restart mysql /etc/rc.d/init.d/mysqld restart 4. You can use the following command to check the “storage engine” used in the server. mysqladmin variables | grep storage_engine […]
Timeout error occurred when trying to start MySQL Daemon.
If you are getting the following error while trying to start MySQL service; [root@ ~]# /etc/init.d/mysqld restart Stopping MySQL: [FAILED] Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] [root@ ~]# And if you are getting the following error in the MySQL log; [root@ ~]# tail -f /var/log/mysqld.log 080503 14:30:28 [ERROR] Can’t start […]
Steps to change the mysql database directory in Linux server
Some times the ‘/var’ partition get crowded and we might need to relocate the database to some other location where there is enough space. Below are the steps given for a trouble free relocation. Note: Let ‘/test/mysql’ be the directory to which we want to relocate the database. Steps to change the mysql database directory: 1. […]
Taking dump of multiple tables
The mysqldump can be used to dump a database or a collection of databases for backup or for transferring the data to another MySQL server. Execute the following command to get the dump of a table. $ mysqldump -uusername -p databasename tablename > dump_filename.sql This table can be added to the database using the following […]
MySQL: got error 28 from server handler
This error means no space left on hard disk. If you get his error, you need to check all filesystems where MySQL operates. a) Stop mysql server # /etc/init.d/mysql stop OR # /etc/init.d/mysqld stop b) Check filesystem and /tmp directories: $ df -h $ cd /tmp $ df -h /tmp c) Remove files from /tmp […]
MySQL service is failing to start up with error “Can’t init databases”
Following is the error message in mysql server log file /var/log/mysqld.log: /usr/libexec/mysqld: Can’t create/write to file ‘/tmp/ibCfJwf1? (Errcode: 13) 070420 10:07:58 InnoDB: Error: unable to create temporary file; errno: 13 070420 10:07:58 [ERROR] Can’t init databases 070420 10:07:58 [ERROR] Aborting 070420 10:07:58 [Note] /usr/libexec/mysqld: Shutdown complete While trying to start it, following is the error. […]
Upgrade MySQL system tables
When you try to create a remote MySQL user, sometimes you may get the following the error. ERROR 1146 (42S02): Table ‘mysql.procs_priv’ doesn’t exist Why this error occurs? MySQL system tables should be updated while upgrading MySQL version in the server and make sure that their structure is up to date. Otherwise, this error […]
MySQL: Access denied for user
MySQL Error : Error connecting to MySQL: Access denied for user: ‘root@localhost’ (Using password: YES) Situation: If we try to connect mysql, sometimes we get an error as given below. Error connecting to MySQL: Access denied for user: ‘root@localhost’ (Using password: YES) This is mainly caused due to the fact that the user root does […]
#2002 – The server is not responding (or local MySQL server’s socket is not correctly configured).
#2002 – The server is not responding (or local MySQL server’s socket is not correctly configured). While accessing PhpMyAdmin you may see the above error. This is due to the missing socket file in the location /tmp. Here is how to fix it: The socket path which is specified in the phpMyAdmin configuration file is […]