Archive for the 'MySQL' Category

Migrating a Primary MySQL Server

I’ve just migrated a primary MySQL server - and everything went smooth. I’ve setup numerous replicated servers, and this was just about as easy, though maybe higher stress! :-)

I’m relocated the primary server to take advantage of the increased bandwidth on a new network I’m managing.

aolserver4-nsmysql

Nice! Finally got AOL Server’s nsmysql driver working with a lot of help from Dossy. (THANKS!)

This was the trick:

make NO_ROPT=1 NEED_ZLIB=1 NO_LDOVERRIDE=1

As well as having libmysqlclient14 and libmysqlclient14-dev. I’m running Lenny, so I had to grab those from Sarge. Thankfully they installed without a problem.

I haven’t actually tried it yet, but I wanted to post the solution before I got distracted with other things. How do I know its working? The logs:


[14/Jul/2008:12:56:46][4967.3083085488][-main-] Notice: modload: loading '/usr/lib/aolserver4/bin/nsmysql.so'
[14/Jul/2008:12:56:46][4967.3083085488][-main-] Notice: Ns_MySQL_DriverInit(mysql):  Loaded Panoptic MySQL Driver v0.6, built on Jul 14 2008 at 12:56:36.

So the fact that aolserver4-nsmysql is included in lenny, but libnsmysql14 is not, is a problem. I haven’t heard back from Riccardo yet, so I’ll hold off on contact him again until I do.

UPDATE: I’ve successfully queried a MySQL database and returned values to a TCL script, and output to a web page. It works. :-)

ld: cannot find -lgcc_s




Finally figured this one out, I think. I was trying to compile aolserver4-nsmysql on debian, using the package source, but I kept hitting that error. then I found some bug about openSUSE related to this, and the workaround for x86 was to do this:

ln -s /lib/libgcc_s.so.1 /usr/lib/libgcc_s.so

DOH! Unfortunately, I’m back to square one. I’m now able to compile aolserver4-nsmysql, but I still get this error when trying to load the driver:

Warning: modload: could not load /usr/lib/aolserver4/bin/nsmysql.so: /usr/lib/aolserver4/lib/libnsmysql.so: undefined symbol: mysql_select_db

Maybe I’ll stick with Postgres?

Dossy seems to be around still, so I’ve just sent an email:

Hi Dossy,

How are you? I’m trying to get your AOL Server mysql driver up and running but keep running into the same problem:

Warning: modload: could not load /usr/lib/aolserver4/bin/nsmysql.so: /usr/lib/aolserver4/lib/libnsmysql.so: undefined symbol: mysql_select_db

I’ve been on this for a few days, I’m using debian lenny, and have /usr/lib/aolserver4/lib in /etc/ld.so.conf.d/aolserver4.conf. I’m using the debian packages for aolserver4 and aolserver4-nsmysql, but since it didn’t work like that, I’ve been trying to compile it myself.

First I ran into an issue where it couldn’t find gcc_s, so I did this:

ln -s /usr/lib/libgcc_s.so /lib/libgcc_s.so

That helped the compile finish, but I still get the same error when starting AOL Server.

What do you think? Any ideas? Thanks!

Albert

More info:

ldd /usr/lib/aolserver4/bin/nsmysql.so
	linux-gate.so.1 =>  (0xffffe000)
	libnsmysql.so => /usr/lib/aolserver4/lib/libnsmysql.so (0xb7fc7000)
	libnsd.so => /usr/lib/aolserver4/lib/libnsd.so (0xb7f69000)
	libnsthread.so => /usr/lib/aolserver4/lib/libnsthread.so (0xb7f60000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7f53000)
	libtcl8.4.so.0 => /usr/lib/libtcl8.4.so.0 (0xb7e9e000)
	libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7e9a000)
	libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7e82000)
	libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7e5d000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7d0e000)
	/lib/ld-linux.so.2 (0x80000000)

PHP MySQL ND

MySQL has created some new code for the mysqli driver, named “mysqlnd”. I’m trying to build it on debian lenny, and so I installed the php5-mysql source. This grabs all the entire php distro, which is fine, but now I have to figure out if its possible (which it probably is) to build only the php5-mysql package.