mysql-5.7.19 Install-free version of the configuration method

Source: Internet
Author: User
Tags mysql client win32

1. Download MySQL Community Server 5.6.13


2. Unzip the MySQL archive package
Unzip the downloaded MySQL package into a custom directory, and my unzip directory is:
"D:\Program Files\mysql\mysql-5.6.13-win32"
Will unzip the directory under the default file My-default.ini copy one copy, renamed My.ini
Copy the following configuration information to My.ini save
#如果没有my-default.ini, you can create your own my.ini or get it from somewhere else.
[Client]
port=3306

[MySQL]

# Set the MySQL client default character set

Default-character-set=utf8

[Mysqld]

#设置3306端口

Port = 3306

# set up the MySQL installation directory

Basedir=e:\mysql-5.7.19-winx64

# Set up a storage directory for MySQL database data

Datadir=e:\mysql-5.7.19-winx64\data

# Maximum number of connections allowed

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

Sql_mode=no_engine_substitution,strict_trans_tables


3. Add Environment variables

The operation is as follows:
1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
Click the New button under System variables
Input variable name: mysql_home
Input variable value: D:\Program files\mysql-5.6.11-winx64
#即为mysql的自定义解压目录.
2) Select path in the system variable
Click the Edit button
To add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and cannot delete the original variable value.


4. Registering MySQL as a Windows system service

1) from the console into the bin directory under the MySQL decompression directory:
2) Enter the Service installation command:
Mysqld Install MySQL--defaults-file= "D:\Program Files\mysql\mysql-5.6.13-win32\my.ini"
#解压目录下修改的my. ini file
A successful installation will prompt the service to install successfully.
#注: The My.ini file is placed in the root directory after MySQL decompression
#移除服务命令为: Mysqld Remove


5. Start the MySQL service

Method One:
The Start service command is: net start MySQL
Method Two:
Open the Administration Tools service and locate the MySQL service.
Start the service by right-clicking to start or by tapping on the left-hand boot directly.


6. Change the password of the root account

The default password for the root account is empty when the installation is complete, and you can modify the password to the specified password. Example: 123456
C:>mysql–uroot
Mysql>show databases;
Mysql>use MySQL;
Mysql>update user SET Password=password ("123456") WHERE user= ' root ';
Mysql>flush privileges;
Mysql>quit

7. mysql Console shortcut established:
1) object location input, new shortcut, right-click, Desktop: C:\Windows\System32\cmd.exe
Shortcut name self-defined, OK, shortcut established successfully
2) Right-click the shortcut you just created, and then change the target column to the MySQL startup parameter:
C:\Windows\System32\cmd.exe "D:\Program files\mysql\mysql-5.6.13-win32\bin"/k mysql-uroot-p Inventory
Explanation: cmd path "mysql Path bin directory"/k mysql-u user name-p password database name
3) Click OK to save after the modification, double click the shortcut to connect to MySQL database

mysql-5.7.19 Install-free version of the configuration method

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.