How to upgrade MySQL to 5.1.52 without breaking DA?

beansbaxter

Verified User
Joined
Mar 17, 2004
Messages
218
Location
WA
I just updated my DirectAdmin to 1.39.1 and it's showing MySQL 5.0.51a as installed. I would like to upgrade MySQL to 5.1.5x, how can I do this and not mess up my DA install?

Running CentOS 5.0 if it matters.

Thanks in advance.
 
Last edited:
Do you have custombuild installed on your server?

You would goto /usr/local/directadmin/custombuild and edit options.conf for the mysql version line, change it to 5.1, then run:
./build update
./build mysql
 
indeed at above, and you can choose if you want to back-up the MySQL databases first before upgrade (i suggest to enable that for this kinda upgrades)
 
I followed the instructions and this error came up during the MySQL upgrade:

Code:
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.1.58-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.1.58-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.1.58-1.glibc23.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.1.58-1.glibc23.x86_64.rpm
Stopping mysqld ...
Shutting down MySQL..                                      [  OK  ]
Upgrading MySQL 5.0 to 5.1
Preparing...                ########################################### [100%]
   1:MySQL-shared           ########################################### [ 25%]
   2:MySQL-client           ########################################### [ 50%]
   3:MySQL-devel            ########################################### [ 75%]
   4:MySQL-server           ########################################### [100%]
ERROR: 1136  Column count doesn't match value count at row 1
110801  1:38:32 [ERROR] Aborting

110801  1:38:32 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

Starting MySQL.                                            [  OK  ]

And then it proceeded to import my databases back in and their were several tables that outputted this error:

Code:
error    : Table upgrade required. Please do "REPAIR TABLE `blog_usercss`" or dump/reload to fix it!

When it finished, the upgrade to 5.1 was complete, and the sites appear to be loading fine, reading the databases fine. Should I be concerned or check anything?
 
Run this:

Code:
/usr/bin/mysqlcheck -uda_admin -p`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --auto-repair --check --optimize --all-databases

Then try again ./build mysql

Regards
 
Run this:

Code:
/usr/bin/mysqlcheck -uda_admin -p`grep "^passwd=" /usr/local/directadmin/conf/mysql.conf | cut -d= -f2` --auto-repair --check --optimize --all-databases

Then try again ./build mysql

Regards

That worked. No errors when I rebuilded mysql and all looks good to go.

Thank you very much!
 
Back
Top