Failed to start mysqld.service: Unit not found


启动mysql

systemctl start mysql.service

出现以下提示

Failed to start mysqld.service: Unit not found

解决

  1. 安装mariadb-server

    yum install -y mariadb-server

  2. 启动服务

    systemctl start mariadb.service

  3. 开机启动

    systemctl enable mariadb.service

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

  4. mysql安全配置及修改数据库管理员密码

    mysql_secure_installation

  5. 开启远程访问权限
    use mysql;
    select User,authentication_string,Host from user;
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';
    flush privileges;

声明:Jefsky-程序猿甜品店|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Failed to start mysqld.service: Unit not found


程序猿甜品店