Seventh week configuration of the job-mysql under Windows system

Source: Internet
Author: User

Because of the project testing requirements, have to install a MySQL locally to more easily debug the program, although the whole process is simple, but also encountered a little trouble, so paste it out when it is a memo.

This is a zip-compressed version of MySQL Community Server 5.7.12 (GPL), which does not use the MSI installation version.

Go to the Mysql website to download and extract to the specified folder, my directory configuration is as follows C:\Users\Super\Mysql-Server

Modify the My-default.ini below the directory to add the following to the file and rename it to My.ini

Basedir = C:\Users\Super\Mysql-Server 

  Port =3306

server_id = 1

The effect is as follows:

  

modifying system environment variables

Append the bin folder of the directory where MySQL is located after path, as in this example:

C:\Users\Super\Mysql-Server\bin

Go to the command line (administrator), if not administrator rights, the next action will be an error

Switch directory to the bin folder of the directory where MySQL is located, execute the mysqld-install command (note: If the command is not executed within the Bin folder, the MySQL registered service directory will be abnormal)

You can then use net start MySQL to turn on the MySQL service.

The configuration on the web is also up to this point, but I have an error message in the process of opening the service:

MySQL failed to start the service did not report any errors

The reason for this problem is that MySQL has failed to initialize the data folder for the Datastore address, causing the system default file to fail to load (which is why I did not configure the DataDir when I configured My.ini), and the solution is as follows

Delete the data folder under MySQL directory

If the previous step is configured with DataDir, it is commented out, do not specify the data directory address, to MySQL self-management data directory creation.

Go to the Bin folder of the directory where MySQL is executing: mysqld--initialize

Then net start MySQL

MySQL service is starting ... MySQL service has been successfully opened

Done!

Seventh week configuration of the job-mysql under Windows system

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.