一、Mysql安装路径
1.配置了环境变量:which mysql
2.默认安装地址:/usr/local/bin
二、Mysql配置路径
/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options'
三、Mysql配置范例
[mysqld]
basedir=/usr/local/mysql
datadir=/app/mysql
port = 3306
server-id=1
pid-file=/app/mysql/mysql3306.pid
socket = /app/mysql/mysql.sock
log_error=/app/mysql/mysql.err
log-bin=mysql-bin
binlog_format=mixed
innodb-file-per-table=ON
skip_name_resolve=ON
lower_case_table_names=1
[lient]
socket = /app/mysql/mysql.sock
port = 3306
四、mysql启动
/usr/local/mysql/bin/mysqld_safe --datadir=/app/mysql --pid-file=/app/mysql/mysql3306.pid
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/app/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysq --log-error=/app/mysql/mysql.err --pid-file=/app/mysql/mysql3306.pid --socket=/app/mysql/mysql.sock --port=3306