下面是通過chkconfig配置多實體自動啟動的程序,重啟主機mysql實體無法自動啟動,請各位大佬幫忙排錯。謝謝。
[root@mysql1 ~]# uname -a
Linux mysql1 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@mysql1 ~]# cp /usr/local/mysql/support-files/mysqld_multi.server /etc/rc.d/init.d/mysqld_multi
[root@mysql1 ~]# chkconfig --add mysqld_multi
[root@mysql1 ~]# chkconfig --list |grep -i mysql
mysqld_multi 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@mysql1 ~]# service mysqld_multi start
WARNING: my_print_defaults command not found.
Please make sure you have this command available and
in your path. The command is available from the latest
MySQL distribution.
ABORT: Can't find command 'my_print_defaults'.
This command is available from the latest MySQL
distribution. Please make sure you have the command
in your PATH.
[root@mysql1 ~]# which my_print_defaults
/usr/local/mysql/bin/my_print_defaults
下面是通過命令啟動多實體的程序:
[root@mysql1 ~]# /etc/init.d/mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld1 is not running
MySQL server from group: mysqld2 is not running
[root@mysql1 ~]# /etc/init.d/mysqld_multi start
[root@mysql1 ~]# /etc/init.d/mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld1 is running
MySQL server from group: mysqld2 is running
uj5u.com熱心網友回復:
另外,把mysqld_multi放到/etc/rc.d/rc.local 下,重啟主機,mysql也無法自動啟動。[root@mysql1 ~]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/etc/init.d/mysqld_multi start
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/93771.html
標籤:MySQL
上一篇:磁卡問題請教大家
