Minor issue upgrading to ART mySQL 4.1.21-2

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
hiddenidentity
Forum User
Forum User
Posts: 30
Joined: Sun Nov 26, 2006 5:31 pm

Minor issue upgrading to ART mySQL 4.1.21-2

Unread post by hiddenidentity »

Just thought I would jot this down, might be of use to someone else.

Had a small issue upgrading my Plesk 7.5.4 CentOS3 box from ART mySQL 4.1.15 to 4.1.21-2 using yum.

Stopped mysql process.

Issuing "yum upgrade mysql" worked fine, all packages downloaded and installed as expected - warning issued about "my.cnf.rpmnew" being written, no problem there.

Looked at my.cnf vs. my.cnf.rpmnew, didnt see any issues there so left alone.

Then trying to restart mysql failed. Checking logs showed an issue trying to init the database. After then moving around my mySQL innoDB files only, I still could not restart, but got messages in the error log about issues with BDB (Berkeley DB), so a bit of googling turned up this bit of info.

http://bugs.centos.org/view.php?id=869

Adding the --skip-bdb switch and bringing in my existing innoDB data files and all was good again in the world - phew!

Failing that, my last option was to kill my full mySQL data folder and allow mySQL to recreate it automagically via the /usr/bin/mysql_install_db command then restore my database data, but I don't know if that actually would have got around the BDB problems anyway?

Just curious, has anyone else have similar issues moving to mySQL 4.1.21 on CentOS?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

CentOS4 right? I added a trigger into ASL to check for that, since at the time I thought that might have been grsec related. You can either launch mysql with the -- flag, or you can add the following to /etc/my.cnf
skip-bdb
hiddenidentity
Forum User
Forum User
Posts: 30
Joined: Sun Nov 26, 2006 5:31 pm

Unread post by hiddenidentity »

No, CentOS3 actually, that URL I posted just seemed to be related somewhat, and at the least gave me the hint about the bdb skip switch.

Thanks for the quick reply, good to know its not something that I have done wrong regardless.

How is it written in the my.cnf file? Do I just add a new line with "skip-bdb" on it? That would prob be nicer than hacking the init.d mysql script.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

You'll want to stick that in like this:

[mysql]
skip-bdb


Then restart mysqld and watch the logs (just in case). That should be all you have to do.
hiddenidentity
Forum User
Forum User
Posts: 30
Joined: Sun Nov 26, 2006 5:31 pm

Unread post by hiddenidentity »

Added it to the [mysqld] section - worked a charm. My complete /etc/my.cnf now reads..


----------
[mysqld]
skip-bdb
safe-show-database
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
----------
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Oh, turn on query caching too. Has nothing to do with bdb, its just going to improve your performance a lot. Add this after the socket line:

query_cache_type=1
query_cache_size = 32M
hiddenidentity
Forum User
Forum User
Posts: 30
Joined: Sun Nov 26, 2006 5:31 pm

Unread post by hiddenidentity »

Thanks for that - well spotted, I assumed query caching was on by default.

I set a cache size of 20MB, im only running a few small sites that do smaller query sizes - I like to keep things neat and small like that :)

This page covers the topic well for others interested..

http://www.databasejournal.com/features ... hp/3110171
Post Reply