linux mysql root密码修改

1. 修改my.cnf:免密码登录mysql

    [mysqld]

    skip-grant-tables

    重启mysql:service mysql restart

2.登录mysql,修改用户表

    update mysql.user set password=PASSWORD('123456') where User='root';

    如果提示不存在字段password,则密码可能保存于:authentication_string

 

posted on 2018-02-02 12:11  细思极恐的大橙子  阅读(92)  评论(0编辑  收藏  举报

导航