Mysqlzip Archive Version (5.7.19) Installation tutorial

Source: Internet
Author: User
Tags mysql client

1. Download the zip archive version from the official website http://dev.mysql.com/downloads/mysql/

2. Unzip to the appropriate directory and configure the environment variables (add *\bin into path);

3. Theoretically now it is possible to install the service directly, but because it is the default configuration, we will have a lot of problems when we use it. For example, the Chinese characters are all garbled and so on, so we recommend configuring the default file first. In the extracted MySQL directory, create a new my.ini,//in the root directory to create a new My.ini file, write the following:

[mysql]# set MySQL client default character set default-character-set== 3306 # Set the installation directory for MySQL basedir=c:\mysql# Set data storage directory for MySQL database datadir=d:\mysql\mysql-5.7.17-winx64\data# allow maximum number of connections max_connections=200# The character set used by the service side defaults to the 8-bit encoded latin1 character set character-set-server=utf8# The default storage engine that will be used when creating a new table - Storage-engine=

Third, the installation of the MySQL service (for linking the database is prompted for this error because the database service is not open, you need to install the MySQL service first)

Enter CMD in the search bar, the above will come out a cmd.exe, and then right-click this cmd.exe choose to run this option as an administrator, the directory switch to the bin directory of your extracted files, and then enter mysqld install return run on the line.

Iv. Start-up service

If it is a later version of mysql5.7, the input net start MySQL startup service will be an error, because there is no data file in the mysql5.7 version, so the natural service fails to start, need to run mysqld-- Initialize create a data directory, you can start the MySQL service normally.

Set the path path (this part is not required, just to reduce the hassle of switching paths each time, so you can set paths)

Right-click My Computer, properties, advanced system settings, environment variable->path-> edit, add all of your MySQL software's Bin directory to path (usually to the front of the path, and then add a ";" in the Last Face). Can).

Six, open MySQL

Enter Mysql-uroot-p, the default is no password, enter can enter, and then the various operations of the database.


[Plain]View PlainCopy
    1. [MYSQL]  
    2. #  set MySQL client default character set   
    3. DEFAULT-CHARACTER-SET=UTF8  
    4. [mysqld]  
    5. #  set 3306 port   
    6. port = 3306   
    7. #  set the installation directory for MySQL   
    8. basedir=d:\database\mysql server 5.7  
    9. #  set the data storage directory for the MySQL database   
    10. datadir=d:\database\mysql server 5.7\data  
    11. #  allows maximum number of connections   
    12. max_connections=200  
    13. #  the character set used by the service side defaults to a 8-bit encoded latin1 character set   
    14. character-set-server=utf8  
    15. #  the default storage engine that will be used when creating a new table   
    16. default-storage-engine=innodb   
    17. #  skip password verification   
    18. #skip-grant-tables  
4. Run cmd (remember to use Administrator status);

5. (important) Executive Order Mysqld--initialize

# # This step is very important, because the previous version of the installation command can be installed directly to install the service, after 5.7 need to initialize the build database file (the root directory of the data file), or the subsequent failure to start the service;

6. Execute command mysqld install, installation service;

7. Execute command net start MySQL, start service; (Stop service net stop MySQL)

8. Execute command mysql-uroot-p, will error Error 1045 (28000), need to set the login password;

9. Open the configuration file My.ini, skip-grant-tables the previous #, then restart the service, login again to skip the password;

10. Go to the MySQL database and execute the following command in turn:

Use MySQL;

Update user Set Authentication_string=password ("root") where user= "root";

Flush privileges;

Quit

11. Open the configuration file My.ini, add the # Comment in front of the skip-grant-tables, then restart the service, log in again using the password set;

12. Enter the command show databases, error error 1820 (HY000);

13. Modify the password set Password=password ("root") once;

14. The installation is complete at this point;


End.

Mysqlzip Archive Version (5.7.19) Installation tutorial

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.