MySQL Error 1067
MySQL: General information. |
System error 1067
Starting MySQL server either as a service or program you receive error message System error 1067 probable cause either the configuration file cannot be found or it contains errors.
Configuration file types
After installing MySQL you will find example configuration files my-small.ini, my-medium.ini, my-large.ini and my-huge.ini alternatively they may have the extension .cnf these are effectively the same thing hence you can use either an extension "ini" or "cnf".
Choose one that best suites your requirements, Uniform Server uses my-small.cnf suitable for a server not heavily accessed and uses a minimum of resources.
Note 1: Do not stick with the file name, rename it to my.cnf or "my.ini" this is what MySQL looks for by default. You can use any name you like however doing so means you need to target the file when starting MySQL for example:
start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
Note 2: When MySQL is run as a service you do need to rename the file to either my.cnf or my.ini hence rename it regardless then its compatible for both methods of running the server.
Scope
If MySQL cannot find a configurations file it spits out System error 1067 this is one common cause of the error. MySQL looks for a configuration file in a defined sequence as shown below:
C:\my.ini C:\my.cnf C:\WINDOWS\my.ini C:\WINDOWS\my.cnf W:\usr\local\mysql\my.ini W:\usr\local\mysql\my.cnf
Global
If you are running more than one server they all look for the file in C:\my.ini C:\my.cnf C:\WINDOWS\my.ini C:\WINDOWS\my.cnf this is referred to as the global scope.
Local
They proceed to look in their own folders (example W:\usr\local\mysql\my.cnf) this is referred to as local scope. MySQL uses the last configuration file it finds.
Local folder:
MySQL uses a relative path from where its binary is located and expects the configuration file to be one level up. In this example the full path to mysqld-opt.exe is W:\usr\local\mysql\bin hence one level up gives W:\usr\local\mysql
Clients
MySQL clients (mysqladmin.exe and mysql.exe) also follow the same procedure in order to locate the configuration file.
Note: The configuration file is general purpose it has defined sections that target a specific application. For example [mysqld] targets the server, [mysql] targets the mysql client and [client] targets all clients. A target ignores all blocks not directly specific to it.
Configuration errors
With the configuration file correctly named and located another cause for System error 1067 are errors in the configuration file.
Generally, system error 1067 occurs because a configuration directive in my.cnf couldn't be processed. This can be due to a typo in the name or value of a setting. Or a path referred to by a setting's value is inaccessible.
System error 1067 is not very informative however it is possible to gain a little more information by running Event Viewer. Click start, click run, type eventvwr.msc and click OK. In the window that opens click on Application (left menu) to the right you will find recent errors, double click on any associated with MySQL. With luck the message in the "Description" box will shed some light on the problem.
Once you have removed the 1067 error there may be other configuration errors, in most cases you get more specific information either displayed or in the log file.
- Can't find errmsg.sys - Check for a mismatch between the basedir value and the actual path to MySQL executable
- No MySQL related errors - Check section headings these kill it stone dead.
- Can't create file - Paths are case sensitive
- Can't open - Again paths are case sensitive
Summary
- Name your configuration file my.cnf or my.ini allows you to run more than one server.
- Locate this file one folder level above the bin folder.
- Paths are case sensitive make sure they match real paths.
Ric |