« Webapp from scratch the right way part 1 | Main

Make MySQL and GFS play nice

So you want to use a GFS shared storage option and have mysql run its databases on that shared storage? Well I had this problem at work and it took a bit to figure out since there wasn't much documentation on it but it works. It is slower then just using it over ext3. I have never tested it on a mysql cluster so I am unsure of the speeds compared to that

So the first thing you want to do is edit your /etc/my.cnf file

in the [mysqld] section you want to add this

skip-innodb

Then in the /etc/init.d/mysql script you want to add --external-locking to the following line so it looks like

/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --external-locking --pid-file="$mypidfile" --log-error="$errlogfile" >/dev/null 2>&1 &

That is pretty much it.. Now if you want to connect to localhost you need to set a new sock file

so in [mysqld] I do something like this

socket=/var/lib/sock/mysql.sock

and in the [client] section ( create one if one isn't in the cnf file)

socket=/var/lib/sock/mysql.sock

Then

mkdir /var/lib/sock/ chown mysql:mysql /var/lib/sock/

mysql should now run over gfs!

TrackBack

TrackBack URL for this entry:
http://www.zcentric.com/cgi-bin/mt-tb.cgi/15

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on June 14, 2007 12:24 PM.

The previous post in this blog was Webapp from scratch the right way part 1.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33