Mysql 5.7.9 installation-free configuration method graphic tutorial, mysql5.7.9

Source: Internet
Author: User

Mysql 5.7.9 installation-free configuration method graphic tutorial, mysql5.7.9

I will share with you the installation-free mysql 5.7.9 configuration method for your reference. The specific content is as follows:

1. decompress the MySQL package
Decompress the downloaded MySQL package to the custom directory. My unzipping directory is: "D: \ Program Files \ mysql-5.7.9-win32"
Copy the default file my-default.ini in the unzipped directory and change it to my. ini.
Copy the following configuration information to my. ini and save it.

# If there is no my-default.ini, you can create my. you can also obtain ################################# ####################### [client] port = 3306 default-character-set = utf8 [mysqld] port = 3306 character_set_server = utf8 # extract the directory basedir = D: \ Program Files \ mysql-5.7.9-win32 # extract the data directory under the data Directory datadir = D: \ Program Files \ mysql-5.7.9-win32 \ data SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [WinMySQLAdmin] D: \ Program Files \ mysql-5.7.9-win32 \ bin \ mysqld.exe ############################### ##########################

2. Add Environment Variables
The procedure is as follows:
1) Right-click my computer-> properties-> advanced system settings (advanced)-> Environment Variables
Click new Under System Variables
Input variable name:MYSQL_HOME
Input variable value:D: \ Program Files \ mysql-5.7.9-win32
# This is the custom extract directory of mysql.
2) Select the Path in the system variable
Click the edit button to add the variable value; % MYSQL_HOME % \ bin to the variable value.
Note:This variable is added after the original variable value and separated by;. The original variable value cannot be deleted.

3.
1) log on to the bin directory under the MySQL decompression directory from the console:

2) enter the service installation command:
1. mysqld -- console
2. mysqld -- initialize
3. mysqld install
After the installation is successful, a message is displayed, indicating that the service is successfully installed.
# Note:# Execute these steps because the data folder does not exist in MySQL5.7.9. You need to use these commands to generate the data folder.
# The command for removing a service is mysqld remove.

4. Start the MySQL Service
Method 1:Run the following command to start the service: net start mysql.
Method 2:
Open the management tools service and find the MySQL service.
Right-click Start or click Start on the left to start the service.

5. Modify the password of the root account
After the service is enabled successfully, press mysql-u root-p and enter the password. The following message is displayed:

ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)

Disable the service. net stop MySQL

Open in safe mode, mysqld -- skip-grant-tables

At this time, the cursor will continue to flash. Note: open another command line window.

6.In the same way as before, log on to mysql-u root-p in the bin directory. If the password is blank, press Enter. Then you can use mysql;
(The password of the previous version may be "password" and "authentication_string" in 5.7.11. You can select * from user to view the password)
(Old Version) update user set password = password ("123456") where user = "root ";
(5.7.11) update user set authentication_string = password ("123456") where user = "root ";

Finally, flush privileges; then OK.

7Finally, try again.

The startup failed. The mysqld process is still running. Just kill it.

Finally, the root password is successfully modified.

The above is how to install and configure mysql 5.7.9, and I hope it will help you learn it.

Related Article

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.