From: http://zhaoshg.javaeye.com/blog/380522
After the installation, mysql5 (an error is reported when the system is running today. The error message is that there are too many MySQL connections and the connection is denied. Then the MySQL service cannot be started, and a 1067 error is reported when the MySQL service is started, startup error is found. Sometimes the startup is normal, but an error occurs immediately when the connection is added.
Error code: 1067
The solution is as follows:
1. Delete % WINDOWS %/My. ini
2. delete my. ini from other locations
3. Copy the my-small.ini to my. ini under the MySQL installation directory
4. Insert in the last line of my. ini:
[Mysqld]
# Set basedir to the MySQL installation path
Basedir = C:/mysql-5.1.11-beta-win32
Datadir = C:/mysql-5.1.11-beta-win32/Data
5. Restart...
C: // mysql-5.1.11-beta-win32/bin> Net start MySQL
MySQL service is starting.
The MySQL service cannot be started.
System error.
System Error 1067 occurs.
The process stops unexpectedly.
C: // mysql-5.1.11-beta-win32/bin> mysqld-NT -- remove
Service successfully removed.
C: // mysql-5.1.11-beta-win32/bin> mysqld-NT -- install
Service successfully installed.
C: // mysql-5.1.11-beta-win32/bin> Net start MySQL
MySQL service is starting.
The MySQL service has been started successfully.
C:/mysql-5.1.11-beta-win32/bin> net stop MySQL
MySQL service is stopping ..
The MySQL service has been stopped successfully.
Reference windows to modify the MySQL installation directory and MySQL DATA DIRECTORY
For MySQL installation in windows, the general default directory is drive C. Therefore, after installation, we usually need to change the installation directory of the file and MySQL data directory.
The general modification method is:
1. Modify the my. ini file. Edit the basedir and datadir,
[Mysqld]
Basedir = E:/program files/MySQL # modify it to your MySQL installation directory
Datadir = E:/program files/MySQL/data # change to your MySQL DATA DIRECTORY
2. Start the DOS interface and run Net start mysql. The system cannot find the specified path.
Because we changed the MySQL installation directory, we could not find the bin startup directory.
Modify the environment variable and add: e:/program files/MySQL/bin in the path.
3. Start MySQL at this time. If an error is reported, open the registry, search for the original MySQL installation path, and replace it with the current new installation path.
4. log out and run the Net start MySQL command again.
Note: A 1067 error occurs when MySQL is started. It is generally caused by a problem in the MySQL configuration file my. ini. Open it and check whether the basedir and datadir paths in it are consistent with your actual security.
The installation directory is the same. If not, run the MySQL Configuration Wizard again and reconfigure it.