Re: mysqld_safe failing

2007-01-17 Thread Colin Charles

Nishant Gupta wrote:


When i try to run mysqld_safe cmd, it fails saying :
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070105 20:23:40  mysqld ended

Also mysqld.pid does not exist at the given path!


It looks like the mysql server can't access /var/run/mysqld

I suggest making sure the permissions are correct (using chown will fix it)
--
Colin Charles, Community Engineer
MySQL AB, Melbourne, Australia, www.mysql.com
Mobile: +614 12 593 292 / Skype: colincharles
Web: http://www.bytebot.net/blog/

MySQL Forge: http://forge.mysql.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysqld_safe failing

2007-01-05 Thread Nishant Gupta

Hi all

When i try to run mysqld_safe cmd, it fails saying :
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070105 20:23:40  mysqld ended

Also mysqld.pid does not exist at the given path!

Any Idea what to do??? mysql_install_db is running fine as well.

Contents of mysqld.log are :

070105 20:23:40  mysqld started
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
070105 20:23:40 [ERROR] Can't init databases
070105 20:23:40 [ERROR] Aborting

070105 20:23:40 [Note] /usr/libexec/mysqld: Shutdown complete

070105 20:23:40  mysqld ended




When i tried to see the shell script running, i get the following msg:

sh -x bin/mysqld_safe --user=root
+ KILL_MYSQLD=1
+ trap '' 1 2 3 15
+ umask 007
+ defaults=
+ case $1 in
++ pwd
+ MY_PWD=/usr
+ test -d /usr/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/libexec
+ user=mysql
+ niceness=0
+ test -x /usr/libexec/mysqld-max
+ MYSQLD=mysqld
+ pid_file=
+ err_log=
+ test -x ./bin/my_print_defaults
+ print_defaults=./bin/my_print_defaults
+ args=
+ SET_USER=2
++ ./bin/my_print_defaults --loose-verbose mysqld server
+ parse_arguments --datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock --old_passwords=1
+ pick_args=
+ test --datadir=/var/lib/mysql = PICK-ARGS-FROM-ARGV
+ for arg in '$@'
+ case $arg in
++ echo --datadir=/var/lib/mysql
++ sed -e 's;--datadir=;;'
+ DATADIR=/var/lib/mysql
+ for arg in '$@'
+ case $arg in
++ echo --socket=/var/lib/mysql/mysql.sock
++ sed -e 's;--socket=;;'
+ mysql_unix_port=/var/lib/mysql/mysql.sock
+ for arg in '$@'
+ case $arg in
+ test -n ''
+ test 2 -eq 2
+ SET_USER=0
++ ./bin/my_print_defaults --loose-verbose mysqld_safe safe_mysqld
+ parse_arguments --err-log=/var/log/mysqld.log
--pid-file=/var/run/mysqld/mysqld.pid
+ pick_args=
+ test --err-log=/var/log/mysqld.log = PICK-ARGS-FROM-ARGV
+ for arg in '$@'
+ case $arg in
++ echo --err-log=/var/log/mysqld.log
++ sed -e 's;--err-log=;;'
+ err_log=/var/log/mysqld.log
+ for arg in '$@'
+ case $arg in
++ echo --pid-file=/var/run/mysqld/mysqld.pid
++ sed -e 's;--pid-file=;;'
+ pid_file=/var/run/mysqld/mysqld.pid
+ parse_arguments PICK-ARGS-FROM-ARGV --user=root
+ pick_args=
+ test PICK-ARGS-FROM-ARGV = PICK-ARGS-FROM-ARGV
+ pick_args=1
+ shift
+ for arg in '$@'
+ case $arg in
++ echo --user=root
++ sed -e 's;--[^=]*=;;'
+ user=root
+ SET_USER=1
+ safe_mysql_unix_port=/var/lib/mysql/mysql.sock
+ test '!' -x /usr/libexec/mysqld
+ test -z /var/run/mysqld/mysqld.pid
+ case $pid_file in
+ test -z /var/log/mysqld.log
+ test -n /var/lib/mysql/mysql.sock
+ args='--socket=/var/lib/mysql/mysql.sock '
+ test -n ''
+ test 0 -eq 0
+ NOHUP_NICENESS=nohup
+ nohup nice
++ nice
+ normal_niceness=0
++ nohup nice
+ nohup_niceness=0
+ numeric_nice_values=1
+ for val in '$normal_niceness' '$nohup_niceness'
+ case $val in
+ for val in '$normal_niceness' '$nohup_niceness'
+ case $val in
+ test 1 -eq 1
+ nice_value_diff=0
+ test 1 -eq 0
+ USER_OPTION=
+ test -w / -o root = root
+ test root '!=' root -o 1 = 1
+ USER_OPTION=--user=root
+ touch /var/log/mysqld.log
+ chown root /var/log/mysqld.log
+ test -n ''
+ test -n ''
+ test -f /var/run/mysqld/mysqld.pid
+ echo 'Starting mysqld daemon with databases from /var/lib/mysql'
Starting mysqld daemon with databases from /var/lib/mysql
++ date '+%y%m%d %H:%M:%S  mysqld started'
+ echo '070105 20:22:45  mysqld started'
+ true
+ rm -f /var/lib/mysql/mysql.sock /var/run/mysqld/mysqld.pid
+ test -z '--socket=/var/lib/mysql/mysql.sock '
+ eval 'nohup /usr/libexec/mysqld  --basedir=/usr --datadir=/var/lib/mysql
--user=root --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
--socket=/var/lib/mysql/mysql.sock   /var/log/mysqld.log 21'
++ nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql
--user=root --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
--socket=/var/lib/mysql/mysql.sock
+ 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
++ date '+%y%m%d %H:%M:%S'
+ echo '070105 20:22:45  mysqld ended'
+ tee -a /var/log/mysqld.log
070105 20:22:45  mysqld ended
+ echo ''
+ tee -a /var/log/mysqld.log



--