Change the MySQL data data file directory and My.ini location (1067 error occurred)

Source: Internet
Author: User

Reference: MySQL change data file directory and My.ini location.
1. Find the My.ini location, and you can get the My.ini path by viewing the executable file path, which corresponds to its properties, through the MySQL startup entry for the Windows service.

"D:\MySQL\MySQL Server 5.5\bin\mysqld"--defaults-file= "D:\MySQL Data\my.ini" MySQL55

2, edit the corresponding datadir in My.ini

Before change: datadir= "D:\MySQL data\data\"

After the change: datadir= "D:\MySQL data\mysql Server 5.5\data\" (modified directory may be due to the new directory without permissions and a 1067 error, set the new directory permissions to start normally)

3. Reorganize MySQL data file directory (if not, MySQL will not start properly)

4. Look up the registry and modify the Defaults-file path associated with the MySQL startup entry:

Key_local_machine/system/services/mysql55

When you are finished, refresh the Windows service and look at the executable path, the MySQL startup item properties, again, with the following results:

"D:\MySQL\MySQL server 5.5\bin\mysqld"--defaults-file= "D:\MySQL data\mysql server 5.5\my.ini" MySQL

Be sure to port the My.ini to the correct directory.

5. Restart MySQL, the configuration is successful.

Change the MySQL data data file directory and My.ini location (1067 error occurred)

Related Article

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.