View previous topic :: View next topic |
Author |
Message |
hexa Apprentice
Joined: 10 Aug 2005 Posts: 163
|
Posted: Wed Feb 06, 2008 12:39 pm Post subject: [S]Clean install -> * MySQL NOT started (0) althou it sta |
|
|
Hi, i have a clean install of a system and can't seem to get basic mysql running. I did install it 50+ times without a problem, but can't figure out what i did wrong this time. Here is some info about it:
Code: |
c2 mysql # ps faxu | grep mysql
root 8722 0.0 0.0 3840 568 pts/1 S+ 13:30 0:00 \_ grep --colour=auto mysql
c2 mysql # /etc/init.d/mysql start
dbg: >>> start()
* Starting mysql ...
dbg: >>> get_slot_config()
dbg: srv 0
dbg: srv_slot 0
dbg: srv_num
dbg: tmp_eval mysql_slot_0[@]
dbg: conf_d_parameters
dbg: MY_SUFFIX
dbg: chroot dir =>
dbg: niceness =>
dbg: basedir => /usr
dbg: datadir => /var/lib/mysql
dbg: pidfile => /var/run/mysqld/mysqld.pid
dbg: socket => /var/run/mysqld/mysqld.sock
dbg: Unamanged =>
dbg: <<< get_slot_config() ok
dbg: >>> checkconfig("/var/lib/mysql")
dbg: <<< checkconfig() ok
* Starting mysql (/etc/mysql/my.cnf)
dbg: starting mysqld with: --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
Starting /usr/sbin/mysqld...
Detaching to start /usr/sbin/mysqld...done.
dbg:
49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,dbg:
* MySQL NOT started (0)
dbg: <<< start() [ !! ]
c2 mysql # ps faxu | grep mysql
root 8844 0.0 0.0 3796 572 pts/1 S+ 13:30 0:00 \_ grep --colour=auto mysql
mysql 8778 0.2 0.6 119884 27440 ? Ssl 13:30 0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
c2 mysql # mysql -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
c2 mysql # netstat -apln | grep mysql
c2 mysql #
c2 conf.d # mysql -p -H
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.54-log Gentoo Linux mysql-5.0.54
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
<TABLE BORDER=1><TR><TH>Database</TH></TR><TR><TD>information_schema</TD></TR><TR><TD>mysql</TD></TR><TR><TD>test</TD></TR></TABLE>3 rows in set (0.00 sec)
mysql> quit;
Bye
c2 conf.d #
c2 conf.d # netstat -apln | grep mys
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 8778/mysqld
unix 2 [ ACC ] STREAM LISTENING 85865 8778/mysqld /var/run/mysqld/mysqld.sock
|
Looks like mysql database takes some time to start up (due to 500GB disk syncing in the background) and init script, doesn't wait long enough. This problem will go away later, but it really sucks if mysql init script works like this.
Is there a way to make init script wait longer to test mysql?
Last edited by hexa on Thu Feb 07, 2008 5:30 pm; edited 1 time in total |
|
Back to top |
|
|
Henry78 Apprentice
Joined: 12 Jul 2004 Posts: 186 Location: Austria
|
Posted: Wed Feb 06, 2008 3:35 pm Post subject: |
|
|
You might want to fiddle with the STARTUPTIMEOUT option in /etc/init.d/mysql. Do this by settint startup_timeout in /etc/conf.d/mysql |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Thu Feb 07, 2008 5:29 pm Post subject: |
|
|
Mysql when starting up for the first does two things that can take awhile depending on your config and I/O usage. It creates an ibdata file and the iblog files which are probably what is causing the timeout. I usually kill off Mysql and restart it after I've made sure it's done writing those files.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
Henry78 Apprentice
Joined: 12 Jul 2004 Posts: 186 Location: Austria
|
Posted: Fri Feb 08, 2008 8:34 am Post subject: |
|
|
I see similar errors, if i configure my eth to obtain an dhcp adress, while mysql is bound on the "external" ip. increasing the timeout improved the situation, but has not been a definite solution. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|