MySQL 5.6 (Win7 64-bit) download, installation and configuration graphic tutorial, mysqlwin7
MySQL is a popular relational database management system. The Installation Package released on the official website has two formats: ZIP format and MSI format. In the MSI format, you can click Install directly and install it according to the installation prompt. Generally, MySQL will be installed in C: \ Program Files \ MySQL Server x. x (x. x is the version number) in this directory. the ZIP format is self-decompressed. After decompression, MySQL can be used, but configuration is required. I use the ZIP format. Therefore, I mainly describe how to download, install, and configure MySQL in the ZIP format.
I. Tools
Win7 64-bit Operating System
2. Steps
Step 1: Download the installation package
Address: http://www.mysql.com/
Up to now (), the latest version of the official website is 5.7.13, but this version is not used. The previous version is 5.6.31.
The default platform is Windows.
Confirm your machine font and click download.
Step 2: Extract
After decompression, You can rename the folder and place it in the appropriate location. I changed the folder name to MySQL Server 5.6 and put it in the D: \ Program Files \ MySQL path. Of course, you can place it in any location you want.
Step 3: Configure (do not rush to use it. It is best to configure it first)
After the environment variable PATH is configured, you do not need to switch the directory after mysql is opened. Principle: Simply put, the PATH in the environment variable is the directory PATH of the cmd system. How does the system know if the command has been entered? How does the system work? In fact, the system searches for the PATH in the current directory and the PATH of the system environment variable. If the first PATH is found, an error is returned. Therefore, after setting the PATH, you can save the trouble of switching directories with commands each time. For example, the system is like a bus and follows the established route. The path in the environment variable is the driving route. Go to a station (find the first directory) and get off (run ).
Process: Computer> System Properties> Advanced System Configuration> Environment Variables
Select PATH and add the PATH to your mysql bin folder (for example, my PATH is D: \ Program Files \ MySQL Server 5.6 \ bin) the modified PATH is:
PATH = .......; D: \ Program Files \ MySQL Server 5.6 \ bin (Note: 1. the semicolon must be added after the original PATH; 2. append, not overwrite .)
Step 4: modify the configuration file
Do not start mysql After configuring the environment variables, but also need to modify the configuration file, the default mysql-5.6.1X configuration file is in D: \ Program Files \ MySQL Server 5.6 \ my-default.ini, you can create another my. modify the configuration in the INI file:
[Mysqld] basedir = C: \ Program Files \ MySQL Server 5.6 (mysql directory) datadir = C: \ Program Files \ MySQL Server 5.6 \ data (mysql directory \ data)
The content of mydefault. ini is as follows:
The content of my. ini is as follows:
Step 5: Install mysql
First, run cmd as the administrator (the command must be run as the Administrator; otherwise, an error will occur if the permission is insufficient)
Next, go to the D: \ Program Files \ MySQL Server 5.6 \ bin directory,
Then run mysql-install. If no error occurs, the installation is successful.
Note: If you have installed mysql before, but it is not uninstalled for some reason, when you install mysql again, the system will prompt that the service already exists. Run the SC delete mysql command to delete the previous version and then run the mysqld-install command.
Step 6: Start the mysql server
Enter the net start mysql command in cmd.
Step 7: log on to mysql
In cmd, enter mysql-u root-p. If you do not have a password for the first login, press Enter. the login is successful.
The command to exit mysql is exit. Closing the cmd window directly does not exit. You need to enter exit to exit.