1. Download MySQL
Website address: https://www.mysql.com/downloads/
2, personal study use, only the following is free
3. Unzip to the directory after downloading, and add the environment variable, as follows
Create Mysql_home
Added to the path path
4, enter the DOS environment start Mysql,win+r shortcut key start window input cmd
Access to MySQL requires an account password to log in, the account password is "root" by default
-U behind the root is the account, enter-p after the return, prompted to enter the password, enter the root return
5. Start MySQL exception handling
5.1. Error Type: Error 2003 (HY000): Can ' t connect to MySQL server on ' localhost ' (10061)
and input net start MySQL prompt service name is invalid, as
Workaround: Start the MySQL service
Enter the DOS window as administrator, enter Mysqld--install, and then enter net start MySQL after successful installation, if the service is successfully started, it can be used normally.
If you enter net start MySQL and the service fails to start, the service does not report any errors, such as
Continue to enter Mysqld-console in the DOS window, this command can view the service startup error message, as follows
Red font can see a file called data in My.ini, we need to manually add
After the directory is created successfully, the input command "mysqld–initialize" initialization, no error indicates everything OK (because the MySQL service is automatically started, so it can be started manually without the input command)
MySQL Learning primer installation and startup and common problems solution (i)