~]# systemctl start mysql.service

要启动MySQL数据库是却是这样的提示

Failed to start mysqld.service: Unit not found

解决方法如下:

  首先需要安装mariadb-server

  ~]# yum install -y mariadb-server

  启动服务

  ~]# systemctl start mariadb.service

  添加到开机启动

  ~]# systemctl enable mariadb.service

进行一些安全设置,以及修改数据库管理员密码

  ~]# mysql_sceure_installation

至此完成!

可以测试一下

  ~]#  mysql -u root -p

相关文章:

  • 2022-12-23
  • 2021-11-12
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-30
  • 2021-09-09
  • 2021-08-19
  • 2021-07-24
  • 2021-08-23
  • 2021-10-14
相关资源
相似解决方案