Skip to Content

Category Archives: mysql

Steps to repair and recover innodb db if corrupted

Written on October 6, 2012 at 2:50 PM, by

Hi, Follow below step by step procedure to repair and recover innodb db if corrupted ******************************************************** I)Add this line to your /etc/my.cnf configuration file: [mysqld] innodb_force_recovery = 4 II)Restart Mysql now. Database should start, but with innodb_force_recovery in my.cnf all Insert and Update operation will be ignored. III)Mysqldump all databases. #mysqldump -A > dump.sql if […]

gcc: /usr/lib64/mysql/ No such file or directory

Written on September 23, 2012 at 11:19 PM, by

In the end of make process, after successful compilation of php 5.3.8 in apache 2.2, if you receive the following errror:   —————————— gcc: /usr/lib64/mysql/ No such file or directory make: *** [] Error 1 —————————— Then, follow the below two steps to fix it: – mkdir -p /usr/lib64/mysql – ln -s /usr/lib64/ /usr/lib64/mysql/ After […]

mysql connection test script

Written on June 11, 2012 at 7:16 PM, by

test mysql connection script: —————————- <? //Connecting to Database. $dbh=mysql_connect (“localhost”, “henrydb”, “henrypass”) or die (‘I cannot connect to the database because:’ . mysql_error()); mysql_select_db (“henrydb”); //Query to database $result = mysql_query(“SHOW tables”); while($row = mysql_fetch_row($result))   {       print(“$row[0]<br>”);   } ?>

Mysql downgrade in cpanel server

Written on March 4, 2012 at 8:54 PM, by

Mysql downgrade In /var/cpanel/cpanel.config, change the following:  mysql-version=5.0  to   mysql-version=4  Save the file and restart cpanel.   Refresh WHM and you will find Mysql 5.0, 4.1, 4 version.  ==============  Rename the /var/lib/mysql folder to mysql-fresh. Edit /var/cpanel/cpanel.config and change the MySQL version from 5.0 to 4.1. Run /scripts/mysqlup –force. The horde database will be created along […]