Steps to upgrade mysql from 5.0 to 5.1

Commonly we are using the following steps to upgrade mysql
1. Backup /etc/my.cnf, /root/.my.cnf ,/usr/local/apache/conf/httpd.conf,libmysqlclient.so module,php.ini file,/va/lib/mysql
2. Edit the file /var/cpanel/cpanel.config then change mysql version to 5.1
3. /scripts/mysqlup
4. /scripts/easyapache
5. /scripts/makecpphp

When we considering the minor upgrades i.e from 5.0 to 5.1 we don’t want to recompile php in all time . Hereby I am enclosing the steps I have followed to upgrade mysql from 5.0 to 5.1 1. Backed up /etc/my.cnf, /root/.my.cnf , /usr/local/apache/conf/httpd.conf, libmysqlclient.so module, php.ini file , /va/lib/mysql 2. Created a data base and connected it using a php script. Here is the details of the php script

<?php mysql_connect(“localhost”,”db_uname”,”password”);
$tables = mysql_list_tables(“db_name”);
echo “<select name=’dbtables’>”;
while (list($table) = mysql_fetch_array($tables)) {
echo “<option value=’$table’>$table</option>”;
}
echo “</select>”; ?>

check if it is working fine before and after upgrade. If it is failed to work after upgrade then we need to compile php, otherwise no need to compile php. Here the script is working fine for me and I didn’t run php compilation.

3. Edit the file /var/cpanel/cpanel.config then change mysql version to 5.1
4. /scripts/mysqlup –force
5. /scripts/makecpphp

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: