引用
1. 管理员登陆系统,停止 MySQL 服务或者结束 MySQL 进程。
2. 启动 WINDOWS 的命令行窗口(即通常的 DOS 窗口:运行cmd),切换到你的 “MySQL\bin” 目录下。
例如我的是 “D:\Program Files\MySQL\MySQL Server 5.2\bin”,然后执行下面的的命令:(注意你的 “my.ini” 位置)
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>cd D:\Program Files\MySQL\MySQL Server 5.2\bin
C:\Documents and Settings\Administrator>d:
D:\Program Files\MySQL\MySQL Server 5.2\bin>mysqld --defaults-file="D:\Program Files\MySQL\MySQL Server 5.2\my.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. 不关闭此命令行窗口,重新打开一个命令行窗口,同样切到 “MySQL\bin” 目录下,然后执行下面的粗体的命令:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>cd D:\Program Files\MySQL\MySQL Server 5.2\bin
C:\Documents and Settings\Administrator>d:
D:\Program Files\MySQL\MySQL Server 5.2\bin>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 Files\MySQL\MySQL Server 5.2\bin>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
分享到:
相关推荐
MacOS安装MySql8.0.19及安装报错解决方案.docx
主要为大家详细介绍了解决mysql安装时出现error Nr.1045问题的方法,感兴趣的小伙伴们可以参考一下
Mysql报错注入详解.docxMysql报错注入详解.docx
安装高版本mysql、解决error 2003、error nr.1364 安装高版本mysql、解决error 2003、error nr.1364
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决: 1.打开在创建mysql容器时挂载的conf目录下的mysqld.cnf(如下文件) 我创建docker的姿势 2.进入mysqlId.cnf文件中在...
mysql安装,出现1045错误,解决方法有两张如资源
MySQL数据库安装常见报错解决方案汇总.docx
您可能感兴趣的文章:mysql自动停止 Plugin FEDERATED is disabled 的完美解决方法MySQL部署时提示Table mysql.plugin doesn’t exist的解决方法MySQL中报错:Can’t find file: ‘./mysql/plugin.frm’的解决方法
mysql配置时提示error nr.2003 can't connect to mysql server on 'localhost'(10061).doc
本文分析了mysql登录报错提示:ERROR 1045 (28000)的解决方法。分享给大家供大家参考,具体如下: 一、问题: 公司linux系统的mysql数据库root用户设置过密码,但常常用命令’mysql -u root -p’登录报错,有时又能...
Error installing ODBC driver MySQL ODBC5.3 ANSI Driver,ODBC error 13:无法加载 MySQL ODBC5.3 ANSI Driver ODBC驱动程序的安装例程, 因为存在系统错误代码 126:找不到指定的模块。 解决方案:如果电脑是...
安装mysql时,报“unable to find a version of the runtime to run this application ”解决方法。
linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下...
Sqlguar的源码中对MySql.Data.dll 做了强引用,版本必须为6.2.1.0,否则会...NuGet中的是最新的,所以基本上不能用,会报错: 需要引用MySql.Data.dll,请在Nuget安装最新稳定版本,如果有版本兼容问题请先删除原有引用;
初学SpringBoot遇到报错,反复检查后,反复查阅资料后,才知道是缺少依赖和tomcat版本不对
win8安装MySQL报错需要的文件
主要介绍了MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)的解决方法,需要的朋友可以参考下
com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error:GlobalConfigUtils setMetaData Fail !