1、设置安全选项:
mysql_secure_installation

2、关闭MySQL
systemctl stop mysqld 

3、重启MySQL
systemctl restart mysqld 

4、查看MySQL运行状态
systemctl status mysqld 

5、设置开机启动
systemctl enable mysqld 

6、关闭开机启动
systemctl disable mysqld 

7、配置默认编码为utf8:
vi /etc/my.cnf #添加 [mysqld] character_set_server=utf8 init_connect='SET NAMES utf8'

其他默认配置文件路径: 

配置文件:/etc/my.cnf 日志文件:/var/log//var/log/mysqld.log 服务启动脚本:/usr/lib/systemd/system/mysqld.service socket文件:/var/run/mysqld/mysqld.pid

8、查看版本
select version();

相关文章:

  • 2021-11-19
  • 2021-07-27
  • 2021-08-17
  • 2022-01-13
  • 2021-06-20
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
猜你喜欢
  • 2021-03-31
  • 2022-02-06
  • 2021-09-06
  • 2021-11-10
  • 2021-10-20
  • 2021-10-03
  • 2021-06-17
相关资源
相似解决方案