引用
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 及安装报错解决方案 MacOS 安装 MySql8.0.19 是...本文档指导了 MacOS 上安装 MySql8.0.19 的过程,并解决了可能出现的安装报错问题,最后还提供了应用连接 Mysql 实例的配置方法和参考资料。
### 安装高版本MySQL与解决Error 2003及Error Nr.1364 #### 一、概述 本文将详细介绍如何安装高版本的MySQL,并针对在安装过程中可能出现的Error 2003(无法连接到MySQL服务器)及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 报错注入是一种安全漏洞利用技术,当应用程序在处理用户输入时未能充分过滤或转义SQL语句,导致数据库因错误语法而返回错误信息,攻击者可以通过分析这些错误信息来获取敏感信息或执行恶意操作。以下是对MySQL...
CentOS_linux下MySQL登录报错ERROR 1045 (28000)解决方法 在本文中,我们将讨论CentOS_linux系统中MySQL登录报错ERROR 1045 (28000)的解决方法。这是因为MySQL密码设置不正确或权限设置不当导致的错误。 在解决这...
安装mysql时,报“unable to find a version of the runtime to run this application ”解决方法。
在MySQL数据库系统中,"Table mysql.plugin doesn’t exist" 是一个常见的错误,通常与系统启动时无法找到必要的系统表有关。这个错误发生的原因是MySQL在初始化过程中无法定位到`mysql`库中的`plugin`表,该表存储...
四、常见问题 4:安装报错需要Visual Studio 问题描述:出现“This application requires Visual Studio 2013 Redistributable. Please install the Redistributable then run this installer again.”。 解决方法...
我们在windows下安装MySQL时会出现Access denied for user ‘root’@localhost'(using password:No)的问题,这个问题是因为你的机器上之前安装过mysql,或者这 一次安装配置了新密码,进入应用的最后一步时候由于...
mysql配置时提示error nr.2003 can't connect to mysql server on 'localhost'(10061).doc
本文将详细介绍如何解决安装MySQL时出现的1045错误,并提供两种有效的解决方法。 #### 错误1045解释 错误1045全称为“Access denied for user 'username'@'localhost' (using password: YES)”,意为使用指定的...
docker安装nacos报错nacos-logback.xml找不到,把该文件放入相应的文件夹中即可
Error installing ODBC driver MySQL ODBC5.3 ANSI Driver,ODBC error 13:无法加载 MySQL ODBC5.3 ANSI Driver ODBC驱动程序的安装例程, 因为存在系统错误代码 126:找不到指定的模块。 解决方案:如果电脑是...
MySQL 连接超时问题解决方案 wait_timeout 参数的重要性 在 MySQL 中,wait_timeout 参数是控制连接超时的关键参数。当该参数设置的太大时,可能会导致 MySQL 中大量的 SLEEP 进程无法及时释放,拖累系统性能。...
之后,将`mysql.server`脚本复制到`/etc/rc.d/init.d/mysqld`,并修改其权限,使其成为可执行的系统服务脚本。通过`chkconfig --add mysqld`命令将MySQL服务添加到系统启动项,确保每次重启系统时自动启动MySQL服务...
### MySQL 数据库在 Spring Boot 项目中启动报错问题解析 #### 错误信息解读 在给定的信息中,我们注意到一个具体的错误信息:...
在初学SpringBoot的过程中,你可能会...总之,理解和掌握SpringBoot的依赖管理、版本匹配原则以及报错排查方法,是提升SpringBoot开发技能的重要步骤。随着实践的积累,你会更加熟练地应对各种报错,从而提高开发效率。
CentOS 7 安装 MySQL 数据库启动报错解决方案 在 CentOS 7 操作系统中安装 MySQL 数据库时,可能会出现启动报错的现象,报错信息为 "Job for mysqld.service failed because the control process exited with error...
win7 系统 the security settings could not be applied to the database 在安装mysql的时候,就会遇到以下错误。遇到错误不可怕,怕的就是被错误所击倒! The security settings could not be applied ...解决方法:
Sqlguar的源码中对MySql.Data.dll 做了强引用,版本必须为6.2.1.0,否则会...NuGet中的是最新的,所以基本上不能用,会报错: 需要引用MySql.Data.dll,请在Nuget安装最新稳定版本,如果有版本兼容问题请先删除原有引用;