1、mysql启动配置文件加载路径
/etc/my.cnf/
/etc/mysql/my.cnf
/usr/local/mysql/etc/my.cnf
~/.my.cnf
2、mysql启动方式
service mysqld start
/etc/init.d/mysqld start
说明mysqld来自
cp /usr/local/mysql/support-file/mysql.server /etc/init.d/mysqld
以下3种方式,可用启动多实例
/usr/local/mysql/bin/mysqld_safe -defaults-file=/path/my.cnf &
/usr/local/mysql/bin/mysqld -defaults-file=/path/my.cnf &
/usr/local/mysql/bin/mysqld_multi start 3306
3、mysql多实例的意义
随着连接数上升,性能下降
做资源隔离
利用mysqld_muti启动管理多实例
准备一个配置文件/etc/my.cnf
[mysql_mutli]
mysqld=
mysqladmin=/usr/local/mysql/bin/mysqladmin
user=
password=
[mysql3306]
port =3306
socket =/tmp/mysql3306.sock
datadir =/data/mysql/mysql3306/data
tmdir =/data/mysql/mysql3306/tmp
server-id=1003306
[mysql3307]
port =3307
socket =/tmp/mysql3307.sock
datadir =/data/mysql/mysql3307/data
tmdir =/data/mysql/mysql3307/tmp
server-id=1003307