• [NavigatLite4Mysql]DB管理工具使用


    连接MysqlDB是出现的问题:

    提示:access denied for user 'root'@'localhost' using password yes/no

    windows xp 安装MYSQL 出现Error 1045 access denied 的解决方法

    原来都好好的,今天开机上来提示上面的这个错误,重启 MySQL 还是不可以。

    注意我这里的环境是 WINDOWS-XP 系统,LINUX 系统下的操作没有验证过,情况不清楚。

    1. 管理员登陆系统,停止 MySQL 服务或者结束 MySQL 进程。

    2. 启动 WINDOWS 的命令行窗口(即通常的 DOS 窗口:运行cmd),切换到你的 “MySQLin” 目录下。
    例如我的是 “D:Program FilesMySQLMySQL Server 5.2in”,然后执行下面的粗体的命令:(注意你的 “my.ini” 位置)

    Microsoft Windows XP [版本 5.1.2600]
    (C) 版权所有 1985-2001 Microsoft Corp.

    C:Documents and SettingsAdministrator>cd D:Program FilesMySQLMySQL Server 5.2in

    C:Documents and SettingsAdministrator>d:

    D:Program FilesMySQLMySQL Server 5.2in>mysqld --defaults-file="D:Program FilesMySQLMySQL Server 5.2my.ini" --console --skip-grant-tables

    100608 9:04:12 InnoDB: Started; log sequence number 0 46409
    100608 9:04:12 [Note] mysqld: ready for connections.
    Version: '5.2.0-falcon-alpha-community' socket: '' port: 3306 MySQL Community
    Server (GPL)
    100608 9:06:57 [Warning] Found invalid password for user: 'root@localhost'; Ign
    oring user

    只要出现上面信息,就说明 MySQL 已经起来了。

    3. 不关闭此命令行窗口,重新打开一个命令行窗口,同样切到 “MySQLin” 目录下,然后执行下面的粗体的命令:

    Microsoft Windows XP [版本 5.1.2600]
    (C) 版权所有 1985-2001 Microsoft Corp.

    C:Documents and SettingsAdministrator>cd D:Program FilesMySQLMySQL Server 5.2in

    C:Documents and SettingsAdministrator>d:

    D:Program FilesMySQLMySQL Server 5.2in>mysql -u root mysql
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 1
    Server version: 5.2.0-falcon-alpha-community MySQL Community Server (GPL)

    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    然后,就是重新设置密码了!

    mysql> UPDATE user SET Password=PASSWORD('root') where USER='root';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.00 sec)

    mysql> quit
    Bye

    4. 好了到此步,可以关闭第一个 DOS 窗口了(关闭服务)。打开系统服务控制窗口(控制面板--管理工具--服务),启动 MySQL 服务。

    5. 在剩下的第二个 DOS 窗口中,用新的 ROOT 密码连接 MySQL。

    D:Program FilesMySQLMySQL Server 5.2in>mysql -u root -p
    Enter password: ****
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 1
    Server version: 5.2.0-falcon-alpha-community-nt MySQL Community Server (GPL)

    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    mysql> quit
    Bye

    至此,系统恢复 ROOT 用户管理权限完成,就是管理员密码的问题,奇怪,官方安装的时候不给出解决方法,貌似已存在很久了。。。

  • 相关阅读:
    Mybatis框架学习_6_mapper.xml 文件中的输入参数详解 (paraterType)
    Mybatis框架学习_5_自定义类型转换器
    Mybatis框架学习_4_属性文件、全局参数、别名
    Mybatis框架学习_3_基于约定或动态代理实现增删改查
    Mybatis框架学习_2_增删改查的简单实现
    Mybatis框架学习_1_简介以及入门示例
    Linux 系统下启动命名的书写过程
    spring-boot-Web学习2-模板引擎 Thymeleaf
    spring-boot-Web学习1-简介
    MacBook无法开机问题
  • 原文地址:https://www.cnblogs.com/webapplee/p/3767448.html
Copyright © 2020-2023  润新知