使用mysqld_multi start 启动了多个mysql实例,但是mysqld_multi stop 却不能停止,为啥呢?因为你还没有授权呢。
/usr/local/mysql/bin/mysqld_multi stop
但是默认是停不掉的,需要我们做一个授权
grant shutdown on *.* to 'username'@'localhost' identified by 'password'
另外还需要在my.cnf配置文件中加上:
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user = username
password = password
/usr/local/mysql/bin/mysqld_multi stop
但是默认是停不掉的,需要我们做一个授权
grant shutdown on *.* to 'username'@'localhost' identified by 'password'
另外还需要在my.cnf配置文件中加上:
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user = username
password = password
编辑回复