Archive for December 9th, 2011

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 […]