> > > - could you tell us more about what software you have interacting with > > > mysql? > > I have some php scripts that read from and write to a database. These > > haven't > > been changed recently and were working fine before mysql was upgraded. > > okay. i'm curious not because i think the software is at fault, but i'm > trying to determine if the software is triggering the problem. there > are, for exmaple, two different versions of mysql in sarge, and > some software is compiled against one version of the client library while some > software is compiled against the other. Fair enough, but mysql is failing to start so my software never gets to interact with mysql. > > could you give the output of > > dpkg -l 'php*' | grep ^ii ii php4 4.3.10-16 server-side, HTML-embedded scripting languag ii php4-common 4.3.10-16 Common files for packages built from the php ii php4-mysql 4.3.10-16 MySQL module for php4
> > and find the mysql.so file provided by your php library (probably > somewhere like /usr/lib/phpFOO/BAR/mysql.so, and then run > > ldd /usr/lib/phpFOO/BAR/mysql.so | grep mysql libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x40010000) I also ran it on the mysql.so files just in case it helps: /> ldd /usr/lib/perl5/auto/DBD/mysql/mysql.so | grep mysql libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x4001d000) /> ldd /usr/lib/python2.3/site-packages/_mysql.so | grep mysql libmysqlclient_r.so.12 => /usr/lib/libmysqlclient_r.so.12 (0x40011000) /> ldd /usr/lib/python2.4/site-packages/_mysql.so | grep mysql libmysqlclient_r.so.12 => /usr/lib/libmysqlclient_r.so.12 (0x40011000) > > > > - it would be helpful to have the actual mysqld cmdline being called > > > (you can figure this out by placing a "set -x" minus the quotes at > > > the top of /usr/bin/mysqld_safe and looking for the call to mysqld). > > That adds the following line to the top of the syslog messages I sent you > > before: > > May 30 13:28:23 /etc/init.d/mysql[21552]: > > i should have been more clear. what i meant was put a set -x near the > top of /usr/bin/mysqld_safe, and then run it as root. you should get > something like: > > towards the end. this is the actual mysql command line being executed, > which is what i want to see. see attached file mysqld.out for the entire output. > > > > - having the output of ltrace on the above mysqld cmdline would be > > > helpful. > > I've never used ltrace before. I tried the following command but it didn't > > work. Not sure what it is I'm doing wrong. > > /> /usr/bin/ltrace -o ltrace.out /usr/bin/mysqld_safe > > /usr/bin/ltrace: Can't open ELF file "/usr/bin/mysqld_safe" > > yes, because mysqld_safe is a wrapper script around the real command > line. once you find the above command line, try passing the whole > line as arguments to ltrace (minus the "++ nohup"). I got that working yesterday in the end, once I figured out I needed to run it on mysqld. However I ran it for over 5 minutes and it never crashed. I then did a Ctrl-C, ltrace stopped and then mysql crashed. I can run ltrace again, this time for much longer, but the output file could be quite large. > > > > sean > > --
+ umask 007 + KILL_MYSQLD=1 + ERR_LOGGER=logger -p daemon.err -t mysqld_safe -i + defaults= ++ pwd + MY_PWD=/root + test -d /root/data/mysql -a -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld + test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld + MY_BASEDIR_VERSION=/usr + DATADIR=/var/lib/mysql + ledir=/usr/sbin + user=mysql + niceness=0 + test -x /usr/sbin/mysqld-max + MYSQLD=mysqld + pid_file= + test -x ./bin/my_print_defaults + test -x /usr/bin/my_print_defaults + print_defaults=/usr/bin/my_print_defaults + args= + SET_USER=2 ++ /usr/bin/my_print_defaults --loose-verbose mysqld server + parse_arguments --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --basedir=/usr --datadir=/var/lib/mysql --tmpdir=/tmp --language=/usr/share/mysql/english --skip-external-locking --bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M --thread_stack=128K --query_cache_limit=1048576 --query_cache_size=16777216 --query_cache_type=1 --log-bin=/var/log/mysql/mysql-bin.log --max_binlog_size=104857600 --skip-bdb + pick_args= + test --user=mysql = PICK-ARGS-FROM-ARGV ++ echo --user=mysql ++ sed -e 's;--[^=]*=;;' + user=mysql + SET_USER=1 ++ echo --pid-file=/var/run/mysqld/mysqld.pid ++ sed -e 's;--pid-file=;;' + pid_file=/var/run/mysqld/mysqld.pid ++ sed -e 's;--socket=;;' ++ echo --socket=/var/run/mysqld/mysqld.sock + mysql_unix_port=/var/run/mysqld/mysqld.sock ++ echo --port=3306 ++ sed -e 's;--port=;;' + mysql_tcp_port=3306 ++ echo --basedir=/usr ++ sed -e 's;--basedir=;;' + MY_BASEDIR_VERSION=/usr ++ echo --datadir=/var/lib/mysql ++ sed -e 's;--datadir=;;' + DATADIR=/var/lib/mysql + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test -n '' + test 1 -eq 2 ++ /usr/bin/my_print_defaults --loose-verbose mysqld_safe safe_mysqld + parse_arguments --socket=/var/run/mysqld/mysqld.sock --nice=0 + pick_args= + test --socket=/var/run/mysqld/mysqld.sock = PICK-ARGS-FROM-ARGV ++ echo --socket=/var/run/mysqld/mysqld.sock ++ sed -e 's;--socket=;;' + mysql_unix_port=/var/run/mysqld/mysqld.sock ++ echo --nice=0 ++ sed -e 's;--nice=;;' + niceness=0 + parse_arguments PICK-ARGS-FROM-ARGV + pick_args= + test PICK-ARGS-FROM-ARGV = PICK-ARGS-FROM-ARGV + pick_args=1 + shift + safe_mysql_unix_port=/var/run/mysqld/mysqld.sock + test '!' -x /usr/sbin/mysqld + test -z /var/run/mysqld/mysqld.pid + test -n /var/run/mysqld/mysqld.sock + args=--socket=/var/run/mysqld/mysqld.sock + test -n 3306 + args=--port=3306 --socket=/var/run/mysqld/mysqld.sock + test 0 -eq 0 + NOHUP_NICENESS=nohup + nohup nice ++ nice + normal_niceness=0 ++ nohup nice + nohup_niceness=0 + numeric_nice_values=1 + test 1 -eq 1 ++ expr 0 - 0 + nice_value_diff=0 + test 1 -eq 0 + USER_OPTION= + test -w / -o root = root + test mysql '!=' root -o 1 = 1 + USER_OPTION=--user=mysql + test -n '' + test -n '' + test -f /var/run/mysqld/mysqld.pid + trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh' 1 + trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 + echo 'Starting mysqld daemon with databases from /var/lib/mysql' Starting mysqld daemon with databases from /var/lib/mysql + echo started + logger -p daemon.err -t mysqld_safe -i -s mysqld_safe[23743]: started + true + rm -f /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.pid + test -z '--port=3306 --socket=/var/run/mysqld/mysqld.sock ' + eval 'nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock 2>&1 | logger -p daemon.err -t mysqld_safe -i -t mysqld' ++ nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock + wait ++ logger -p daemon.err -t mysqld_safe -i -t mysqld + test '!' -f /var/run/mysqld/mysqld.pid + echo 'STOPPING server from pid file /var/run/mysqld/mysqld.pid' STOPPING server from pid file /var/run/mysqld/mysqld.pid + break + echo ended + logger -p daemon.err -t mysqld_safe -i -s mysqld_safe[23751]: ended