时间:2021-07-01 10:21:17 帮助过:3人阅读
vim /etc/my.cnf
[mysqld] bind-address=0.0.0.0 port=3306 user=mysql basedir=/usr/local/mysql datadir=/data/mysql socket=/tmp/mysql.sock log-error=/data/mysql/mysql.err pid-file=/data/mysql/mysql.pid slow_query_log = ON slow_query_log_file = /data/mysql/slow.log long_query_time = 1 #character config character_set_server=utf8mb4 symbolic-links=0
初始化
cd /usr/local/mysql/bin ./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql-5.7.26/ --datadir=/data/mysql/ --user=mysql --initialize
查看初始密码,复制出来
vim /data/mysql/mysql.err
启动并修改root密码
service mysqld start
MySQL5.7.x二进制安装
标签:str utf8 ali bsp iba def init 上传 erro