MySQL is a small but powerful database, which is very popular at present. However, the official website gives the installation package in two formats, one in MSI format and one in ZIP format. Many people under the ZIP format decompression found no Setup.exe, face a pile of files confused, do not know how to install. The following article describes how to resolve various issues during installation in this situation
MySQL installation files are divided into two types, one in MSI format and one in ZIP format. If the MSI format can be directly clicked on the installation, according to the installation prompts it to install (I believe you can read English tips), general MySQL will be installed in the D:\software\mysql-5.6.25-winx64 directory; Zip format is its own decompression, After decompression, in fact, MySQL can be used, but to configure.
After decompression can rename the folder, put in the appropriate location, personal suggestions to rename the folder to MySQL Server 5.6, put in the D:\software\mysql-5.6.25-winx64 path. Of course you can put it anywhere you want.
After completing the above steps, many users start using MySQL, but there is an error in the diagram. This is because environment variables are not configured. Configuring environment variables is simple:
My Computer, properties, advanced environment variables
Select Path, after which you add: the path to your MySQL Bin folder (for example: D:\software\mysql-5.6.25-winx64)
Path=.;D: \software\mysql-5.6.25-winx64 (note is append, not overwrite)
After configuring the environment variables do not be busy to start MySQL, we also need to modify the configuration file (if not configured, after the start of the error will appear in the diagram Oh!). : Error 2 system cannot find file), mysql-5.6.2x default profile is D:\software\mysql-5.6.25-winx64\my-default.ini, or create a My.ini file yourself,
In which the configuration () is modified or added:
[Mysqld]
basedir=d:\software\mysql-5.6.25-winx64 (MySQL directory)
Datadir=d:\software\mysql-5.6.25-winx64\data (MySQL directory \data)
Run cmd as administrator (be sure to run as administrator, or not have enough permissions),
Input: cd D:\software\mysql-5.6.25-winx64\bin into the MySQL Bin folder (regardless of whether the environment variable has been configured, also to enter the Bin folder, or after the start of the service will still report error 2)
Enter Mysqld-install (if run without administrator, there will be an error due to insufficient permissions: Install/remove of the Service denied!)
Installation Successful
After the installation is successful, start the service, continue to enter in cmd: net start MySQL (), the service started successfully!
At this time many people will appear error, please see note:
Note: Error 2 and error 1067 often occur at this time.
If the "Error 2 system cannot find a file", check whether the configuration file has been modified or whether to enter the bin directory, if the configuration file is correct and enter the Bin folder, you need to remove MySQL (input mysqld-remove) and then reinstall (Input mysqld- Install);
If error 1067 occurs, it is a configuration file modification error, verify that the configuration file is correct.
After the service started successfully, you can log in, enter Mysql-u root-p (no password for the first login, press ENTER directly), Login success!
END