In-depth Analysis and Solutions for MySQL Service Startup Error 1067

Dec 07, 2025 · Programming · 10 views · 7.8

Keywords: MySQL Error 1067 | Windows 7 Installation Issues | Service Startup Failure

Abstract: This article provides a comprehensive exploration of Error 1067 encountered during MySQL installation on Windows 7. By analyzing key error log messages such as the absence of 'mysql.plugin' and 'mysql.host' tables, and integrating the best solution, it identifies avoiding spaces in the installation path as the core method. Additional common causes like port conflicts, data file corruption, and configuration path errors are discussed, with detailed technical analysis and step-by-step procedures to help readers fully understand and resolve MySQL service startup failures.

Problem Background and Error Analysis

When installing MySQL on Windows 7, users may encounter Error 1067 when attempting to start the MySQL service, accompanied by detailed log information. The error log typically displays key messages such as:

101111 22:27:11 [Note] Plugin 'FEDERATED' is disabled.
C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Table 'mysql.plugin' doesn't exist
101111 22:27:11 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: Log scan progressed past the checkpoint lsn 0 37356
101111 22:27:11  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 44233
101111 22:27:11  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
101111 22:27:12  InnoDB: Started; log sequence number 0 44233
101111 22:27:12 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

From the log, the core issue is the absence of MySQL system tables (e.g., mysql.plugin and mysql.host), often caused by installation or configuration problems. Although the InnoDB crash recovery process completes successfully, the lack of privilege tables ultimately prevents service startup.

Core Solution: Avoid Spaces in Installation Path

Based on the best answer (score 10.0), the most effective solution is to reinstall MySQL, ensuring the installation path contains no spaces. In Windows systems, spaces in paths can lead to file access permission issues or parsing errors, affecting MySQL service startup. For example, the default path C:\Program Files\MySQL\MySQL Server 5.1\ includes spaces, which may trigger Error 1067. It is recommended to install MySQL in a space-free path, such as C:\MySQL\ or C:\ProgramFiles\MySQL\ (note ProgramFiles as one word). Here is a simple example of installation path selection:

Installation Directory: C:\MySQL\Server5.1\

During installation, users should carefully choose custom options and specify a path without spaces. After reinstallation, restart the MySQL service, which typically resolves the issue. If problems persist, other potential causes should be investigated.

Supplementary Solutions and In-depth Analysis

In addition to installation path issues, other answers provide additional insights and solutions that can complement the core method.

Port Conflict Issues

The second answer (score 8.1) notes that if the mysqld.exe process is already running in non-service mode and occupies the default port 3306, the MySQL service will fail to start. This can be resolved by:

  1. Opening Windows Task Manager and searching for mysqld.exe under the Processes tab.
  2. If found, terminate the process.
  3. Run net start MySQL in the command prompt (assuming the service name is MySQL) to start the service.

Port conflicts are common in network services; ensuring port 3306 is not used by other applications is crucial for MySQL stability.

Data File Corruption and Recovery

The third answer (score 5.4) mentions that after abnormal shutdowns like power failures, InnoDB log files (ib_logfile0 and ib_logfile1) may become corrupted, causing startup failures. The solution includes:

  1. Navigating to the MySQL data directory (usually in the data folder under the installation directory).
  2. Deleting the ib_logfile0 and ib_logfile1 files.
  3. Restarting the MySQL service, allowing InnoDB to recreate new log files automatically.

This method applies to data inconsistency caused by hardware failures or unexpected interruptions, but caution is advised as deleting log files may risk data loss.

Configuration File Path Errors

The fourth answer (score 4.6) suggests checking if the data directory path specified in the configuration file (e.g., my.ini or my.cnf) is correct. If the configured path does not match the actual data folder contents, it may lead to table absence errors. Steps to resolve include:

  1. Locating the MySQL installation directory and verifying the existence and contents of the data folder.
  2. Checking the datadir setting in the configuration file to ensure it points to the correct data folder path.
  3. If the path is incorrect, copying the correct data folder contents to the configured directory or updating the configuration file to match the actual path.

Configuration file management is critical in MySQL deployment; incorrect path settings can directly cause service startup failures.

Technical Summary and Best Practices

In summary, MySQL service startup Error 1067 is often caused by multiple factors, with spaces in the installation path being the most common. To prevent and resolve such issues, it is recommended to follow these best practices:

By applying these methods comprehensively, users can effectively resolve MySQL startup errors and enhance database system reliability. In practice, start with the core solution and gradually investigate other potential causes if issues persist.

Copyright Notice: All rights in this article are reserved by the operators of DevGex. Reasonable sharing and citation are welcome; any reproduction, excerpting, or re-publication without prior permission is prohibited.