Fault diagnosis and elimination of MySQL installation under Windows

Source: Internet
Author: User

When you first install and run MySQL, you may encounter some errors so that the MySQL server does not start. The purpose of this section is to help you diagnose and correct these errors.

Your first information when troubleshooting server problems is the error log. The MySQL server uses error logs to record information that the server cannot start. The error log is located in the data directory specified by the My.ini file. The default data directory is located in C:Program filesmysqlmysql Server 5.1dat.

Another error-related information source is the message displayed on the console when the MySQL service starts. After installing mysqld as a service, view the MySQL service boot-related error message from the command line through the net start MySQL command.

The following distance describes the most common error messages you will encounter when you first install and start the MySQL service:

· System error 1067 has occurred.

· Fatal Error:can ' t open privilege tables:table ' mysql.host ' doesn ' t exist

• These messages appear when the MySQL server cannot find the MySQL rights database or critical files. This problem is typically encountered when the MySQL base or data directory is not installed in the default location (C:mysql and C:Program filesmysqlmysql Server 5.1data) but is installed in a different location.

One of the things that happened is that MySQL was upgraded or installed to a new location, but the configuration file was not updated to correspond to the new installation location. It may also be a new and old profile conflict, and when you upgrade MySQL, be sure to delete or rename the old configuration file.

If you did not install MySQL into the C:Program filesmysqlmysql Server 5.1 directory, but installed it in a different directory, you need to use the configuration (My.ini) file to let the MySQL server know the installation directory. The My.ini file should be located in the WINDOWS directory, typically c:winnt or c:windows. You can enter the following command at the command prompt to determine the exact location from the WINDIR environment variable Value:

C:> echo%windir% can create and modify option files through a text editor, such as Notepad. For example, if MySQL is installed under E:mysql and the Data directory is in D:mysqldata, you can create the option file and set [mysqld] to specify values for the Basedir and DataDir parameters:

[Mysqld]

# set Basedir to your installation path

Basedir=e:/mysql

# set DataDir to the location of your data directory

Datadir=d:/mysqldata

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.