Archive for the ‘Mysql’ Category

Mysql error : Can’t create new tempfile: ‘*.TMD file

If you are getting error like Can’t create new tempfile: ‘tablesname.TMD file error while repairing corrupted database tables please try use following command to fix it. Solution :  You need to just run below command on the shell. # myisamchk -r -f  tables.MYI Thats all.    

mysqldump: Got error

When you try to run the mysqldump command to make a backup of database then encounter the following error-exception: mysqldump databasename  > databasename.sql mysqldump: Got error: 1016: Can’t open file: ‘./databasename/wp_142_term_taxonomy.frm’ (errno: 24) when using LOCK TABLES Solution: Open the file /etc/my.cnf and  add the following line and restart the mysql service on the server root@server [~]#vi /etc/my.cnf open-files-limit=20000 […]

Manager of pid-file quit without updating fi

Error : Manager of pid-file quit without updating fi Solution :  When try to restart the mysql service on the server then above error is generated. This problem is occurred due the “mysql ” database crashed and should be repaired but the mysql is already stopped on the server  so you need to use the following command […]

mysql service is not working

Please login to server as root and fire below commands 1) killall -9 mysqld 2) cd /etc/rc.d/init.d 3) safe_mysqld –skip-grant-tables & 4) mysqladmin status Enjoy

How to repair mysql database table manually?

You can repair the database table manually from shell by using following command. root@admin[~]mysql>mysql –u databaseusername –p databasename For example if we are using database gunjan_db root@admin[~]mysql mysql> use gunjan_db; Database changed mysql> show tables; +———————————————+ | Tables_in_gunjan_db              | +———————————————+ | additional_images | address_book | address_format | administrators | banners | banners_history | cache […]

“unauthenticated user” problem in mysql logs

While running following command. mysqladmin -i3 pr We are getting result. 056 | unauthenticated user | localhost |    | Connect |      | Reading from net | To avoid such problem add following lines in /etc/my.cnf file to avoid access for unauthenticated user. root@server [~]# pico /etc/my.cnf skip-networking skip-name-resolve skip-host-cache skip-locking Now restart the mysql service […]

Backup of mysql database using cron job.

To generate the backup of mysql database using cron job refer following three format as per your requirement. 1) Cron job to generate  database backup in  .sql format * * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword > /path of database database.sql 2) Cronjob to compress database backup in .bz2 format * * * […]

Using encrypted passwords in mysql

It is a good idea to store passwords in encrypted forms in mysql databases. Function MD5() is a good option to encrypt the passwords. You can use this function in the mysql codes to encrypt the passwords. There may be some situations that we may need to reset the password stored in encrypted form, then […]

InnoDB: Operating system error number 13 in a file operation.

You might come across with following error while starting mysql. ———————————– 071027 7:43:13 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: ‘open’. InnoDB: Cannot continue operation. 071027 07:43:13 mysqld ended […]

Disk full error in MySQL logs

Disk full error in MySQL logs. ——————- 81218 14:53:40 [ERROR] /usr/libexec/mysqld: Disk is full writing ‘/tmp/#sql_5047_21.MYI’ (Errcode: 28). Waiting for someone to free space… Retry in 60 secs ——————- This occurs when /tmp runs out of space. Check the size of /tmp partition. It should be atleast 3 times as the size of largest table. […]