zoukankan      html  css  js  c++  java
  • #1045 Access denied for user 'root'@'localhost'

    在windows下的解决办法如下:

        1.net stop mysql 停用服务

        2.修改${mysql_home}/MySQL Server 5.1目录下的my.ini文件

              [mysqld]下面添加这句:
                  skip_grant_tables

        3.把你的${mysql_home}\bin目录加入path路径里边

        4.net start mysql 启动mysql服务

        5.mysql -uroot -p
           Enter password:root

        6.use mysql;

         mysql>UPDATE user SET Password=PASSWORD('root') where USER='root';
           mysql>FLUSH PRIVILEGES;
           mysql>exit

        7.删除my.ini中的这句话:skip_grant_tables
           net stop mysql
           net start mysql

           8.可以登录了

           mysql -uroot -proot
           mysql>

  • 相关阅读:
    Kaggle & Machine Learning
    练习题目总结
    日常练习//算法类
    论文阅读
    codeforces专项
    10.26—11.1
    常见算法笔记
    DM/ML学习实践(一)
    Python常见代码
    HDU 4251 --- 主席树(划分树是正解)
  • 原文地址:https://www.cnblogs.com/myphoebe/p/2154964.html
Copyright © 2011-2022 走看看