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