mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists

前端 未结 4 821
南旧
南旧 2020-12-02 03:55

While starting mysql server 5.7.17 using mysqld_safe, following error occcours.

2017-02-10T17:05:44.870970Z mysqld_safe Logging to \'/var/log/mysql/error.log         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-02 04:55

    Work for me in CentOS:

    $ service mysql stop
    $ mysqld --skip-grant-tables &
    $ mysql -u root mysql
    
    mysql> FLUSH PRIVILEGES;
    mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
    
    $ service mysql restart
    

提交回复
热议问题