MySQL Installation and configuration

Source: Internet
Author: User

1. Download and unzip

2. Create a new My.ini file with the following content

[MySQL]  # set MySQL client default character set  Default-character-set=utf8  [mysqld]  #设置3306端口  port = 3306  # Set the MySQL installation directory  basedir=d:\mysql-5.7.21-winx64# Setting the data storage directory of the MySQL database  datadir=d:\mysql-5.7.21-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  Default-storage-engine=innodb  

  

3. Run cmd as Administrator, switch to Bin directory

4. Enter Mysqld Install

5. Input: mysqld--initialize-insecure--user=mysql

MySQL will build a data folder, and set up the default database, login user name is root, password is empty

6. Start: net start MySQL

Attention:

After starting the service, if you do not want to switch directories in CMD and want to enter the MySQL statement directly, you need to add the path to the bin directory of the MySQL installation directory into the path variable of the system environment variable.

There is a need to note that when installing the MySQL service, be sure to switch to the MySQL installation directory in the bin directory, regardless of whether you configure environment variables, or if you start the service after installation is still reported error-"A system error 2 system cannot find the specified file." ”

7. Login

Log in/Enter MySQL database

CMD window input: Mysql-u root–p, enter, enter password, then enter.

MySQL Installation and configuration

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.