晕,照着这篇文章停止了MYSQL后,改密码成功,然后就无法重启MYSQL了我是W2003服务器,重启MYSQL时提示:
在本地计算机无法启动 MYSQL 服务
错误193:0cx1
晕死文章如下:
Resetting the Root Password on Windows SystemsUse the following procedure for resetting the password for any MySQL root accounts on Windows: 上面这句废话是说在windows 系统中重设mysql的root密码(也就是phpmyadmin的密码)的方法. PS:linux系统下另有方法,不再多说。1、Log on to your system as Administrator.用超级管理员进入你的win系统2、Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: 如果mysql服务在运行的话,停止它,方法如下:Start Menu -> Control Panel -> Administrative Tools -> Services开始--->控制面板--->管理工具--->服务.Then find the MySQL service in the list, and stop it. 找到mysql的服务,点右键停之If your server is not running as a service, you may need to use the Task Manager to force it to stop. 如果你并没有在服务里找到的话,你可能需要在任务管理器里停止它{早说我不早不直接在任务管理器里把它结束了?浪费时间}3、Create a text file and place the following statements in it. Replace the password with the password that you want to use. 打开一个文本文件,写如以下代码,用你想更改的密码代替文中的MyNewPass。代码如下:UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;The UPDATE and FLUSH statements each must be written on a single line. The UPDATE statement resets the password for all existing root accounts, and the FLUSH statement tells the server to reload the grant tables into memory. 这句比较长的废话是说:update及Flush一定要换行(应该是这样理解吧?必须写在单一的直线上?)并且告诉你Update及Flush命令的作用是什么4、Save the file. For this example, the file will be named C:\mysql-init.txt保存这个文件,比如像这样保存:C:\mysql-init.txt5、Open a console window to get to the command prompt: Start Menu -> Run -> cmd  打开命令窗口6、Start the MySQL server with the special --init-file option:C:\> C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt进入你的mysql安装目录下的bin目录。进入方法不用说了吧?就是cd X:\mysql\bin
然后运行后面的命令如果没有错的话,你已经可以用新密码进你的phpmyadmin了。因为我是直接就可以用新密码进了,所以后面的就没有操作了。Users of MySQL 4.1 and higher who installed MySQL using the MySQL
Installation Wizard may need to specify a --defaults-file option
如果是4.1及以上的高版本的话,可能需要加一个安装目录的命令。如下:
C:\> "C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt.exe"
         --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
         --init-file=C:\mysql-init.txt
The appropriate --defaults-file setting can be found using the Services Manager:怎么样找这个安装目录呢?Start Menu -> Control Panel -> Administrative Tools -> Services
进入服务管理
Find the MySQL service in the list, right-click on it, and choosethe Properties option. The Path to executable field contains the --defaults-file setting.
找到mysql服务,右键点之,选择属性,就可以看到路径了。After the server has started successfully, delete C:\mysql-init.txt
然后你就可以删除文件了。

解决方案 »

  1.   

    你说的是不是目录里面的.err文件?
    我也找出来看了,没发现什么异常,或者说是我不会看,里面的部分内容如下:
    100913 14:27:11  InnoDB: Started; log sequence number 0 22399533
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100914  5:36:36 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100914  5:36:36  InnoDB: Starting shutdown...
    100914  5:36:39  InnoDB: Shutdown completed; log sequence number 0 23218091
    100914  5:36:39 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100914  5:37:53  InnoDB: Started; log sequence number 0 23218091
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100914 11:49:04 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100914 11:49:04  InnoDB: Starting shutdown...
    100914 11:49:07  InnoDB: Shutdown completed; log sequence number 0 23533539
    100914 11:49:07 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100914 11:50:20  InnoDB: Started; log sequence number 0 23533539
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100914 12:58:54 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100914 12:58:54  InnoDB: Starting shutdown...
    100914 12:58:56  InnoDB: Shutdown completed; log sequence number 0 23585742
    100914 12:58:56 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100914 13:00:11  InnoDB: Started; log sequence number 0 23585742
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100917 11:30:18 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100917 11:30:18  InnoDB: Starting shutdown...
    100917 11:30:20  InnoDB: Shutdown completed; log sequence number 0 27114249
    100917 11:30:20 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100917 12:12:58  InnoDB: Started; log sequence number 0 27114249
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100925 11:20:27 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100925 11:20:27  InnoDB: Starting shutdown...
    100925 11:20:32  InnoDB: Shutdown completed; log sequence number 0 36046617
    100925 11:20:32 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100925 11:37:41  InnoDB: Started; log sequence number 0 36046617
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100925 11:44:35 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100925 11:44:37  InnoDB: Starting shutdown...
    100925 11:44:39  InnoDB: Shutdown completed; log sequence number 0 36051755
    100925 11:44:39 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete100925 11:46:00  InnoDB: Started; log sequence number 0 36051755
    d:\RSFax\MySQL\bin\mysqld-nt: ready for connections.
    Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary
    100925 13:07:42 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Normal shutdown100925 13:07:44  InnoDB: Starting shutdown...
    100925 13:07:48  InnoDB: Shutdown completed; log sequence number 0 36144682
    100925 13:07:48 [Note] d:\RSFax\MySQL\bin\mysqld-nt: Shutdown complete
      

  2.   

    参考下贴三楼
    http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html