时间:2021-07-01 10:21:17 帮助过:10人阅读
8、初始化
# cd /usr/local/mysql
# ./scripts/mysql_install_db --defaults-file=/etc/my.cnf
看到两次ok
9. 启动 & 关闭
启动:
# /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf &
或者
# /usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf &
关闭:
# /usr/local/mysql/bin/mysqladmin -S /tmp/mysql3376.sock shutdown
10、 安全加固
# delete from mysql.user where user!=‘root‘ or host!=‘localhost‘;
# truncate table mysql.db;
# drop database test;
# flush privileges;
怎么确认mysql是启动起来的?
A 查看进程是否存在
# ps axu |grep mysqld
B 查看端口是不是监听正确
# ss -lnpt |grep mysqld
C 看看错误日志有无异常
MySQL二进制文件规范安装
标签: