'Access denied for user 'root'@'localhost' (using password: NO)'

后端 未结 8 1312
夕颜
夕颜 2020-11-29 21:28

I\'m trying to set the password of the user root but I\'m gettin the error below, any idea?

+----------------------------------------------------------------         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 22:07

    # /etc/init.d/mysqld stop
    
    Stopping MySQL: [ OK ]
    
    # mysqld_safe --skip-grant-tables &
    
    [1] 13694
    
    # Starting mysqld daemon with databases from /var/lib/mysql
    
    
    
    # mysql -u root
    
    Welcome to the MySQL monitor. Commands end with ; or \g.
    
    Your MySQL connection id is 1
    
    Server version: 5.0.77 Source distribution
    
    
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    
    
    mysql>
    

提交回复
热议问题