TimeOut error while starting mysqld deamon
Dear All,
I am facing problem while starting mysqld deamon on RHEL 5.4 Code:
[zabbix@CDCTGIMCLSB ~]$ sudo /sbin/service mysqld start Code:
[root@CDCTGIMCLSB ~]# /usr/bin/mysqld_safe Thanks in advance.. |
- ls -l /data/mysql?
- Post up your config file (/etc/my.cnf) and init script (/etc/init.d/mysqld) |
Quote:
Here is the output of ls -l /data/mysql Code:
[root@CDCTGIMCLSB ~]# ls -l /data/mysql Code:
[mysqld] Code:
#!/bin/bash |
Change the datadir in init script correlative with which you set in the config file:
Code:
get_mysql_option mysqld datadir "/var/lib/mysql" Code:
ln -s /data/mysql /var/lib/mysql |
Thanks again for your response quanta..
I changed the path to datadir to /data/mysql as you suggested. Code:
get_mysql_option mysqld datadir "/data/mysql" Hope that should not be the problem, because I was able to start the deamon before with same configuration. Suddenly when I tried to restart the deamon I am experiencing this. |
Check the socketfile.
|
Quote:
Now my data directory got disappeared in node A and appearing in node B. So mysql service is getting started at node A which was not starting before and a socket file got created under /var/lib/mysql/mysql.sock. Hope there should be some problem in mysql cofiguration. How mysql deamon can start without the presence of /data/mysql directory ? |
Change:
Code:
get_mysql_option mysqld socket "$datadir/mysql.sock" Code:
socketfile="/var/lib/mysql/mysql.sock" |
Quote:
I tested this as well, but no luck so far. By the way, we do not have to change this because this init script will take the datadir, socketfile parameters from /etc/my.cnf file. If you can observe the init script, there is a function called get_mysql_option(), under whihch my_print_defaults command collects the parameters defined in /etc/my.cnf file and that will be considered. If parameters are not defined in /etc/my.cnf file, then as you have suggested, default parameteres will be considered. Here is the output of /usr/bin/my_print_defaults mysqld command with is under get_mysql_option() function. Code:
[root@CDCTGIMCLSA ~]# sudo /usr/bin/my_print_defaults mysqld Code:
[root@CDCTGIMCLSA ~]# sudo /usr/bin/mysqld_safe --datadir=/data/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql Awaiting your response. |
Sorry for my wrongs. I suggest you open 2 consoles, one for starting mysqld_safe while monitoring the log file (/var/log/mysqld.log) on the other.
|
All times are GMT -5. The time now is 02:19 AM. |