MySQL 5.7 version installation configuration method graphics and text tutorial (MySQL 5.7.12\mysql 5.7.13\mysql 5.7.14) _mysql

Source: Internet
Author: User
Tags change settings flush mysql client mysql command line

MySQL before the installation of the 5.7.12 did not make a summary, to replace the new computer, fill in the installation record, installation, find some users of the installation records, found a lot of pits

(i) MySQL 5.7.13 installation configuration method

1, Mysql-5.7.12-winx64.zip download
Official Download Address: http://dev.mysql.com/downloads/mysql/

2. Extract to C:\job\mysql-5.7.12-winx64

3. Create a new My.ini configuration file under C:\job\mysql-5.7.12-winx64
the contents are as follows:

################### #配置文件开始 ################### # for advice on ' How to ' change settings, please. # http://dev.mysql.co m/doc/refman/5.7/en/server-configuration-defaults.html # * * * does not EDIT this FILE. It's a template which'll be copied to the # * * * * * * * * * * * * * * * * * * * * location during install, and would be replaced if u

 Pgrade to a newer version of MySQL. [Client] Default-character-set=utf8 [mysqld] port=3306 basedir = "c:\job\mysql-5.7.12-winx64/" DataDir = "C:\jo b\mysql-5.7.12-winx64/data/"Tmpdir =" c:\job\mysql-5.7.12-winx64/data/"socket =" c:\job\mysql-5.7.12-winx64/data/ Mysql.sock "log-error=" c:\job\mysql-5.7.12-winx64/data/mysql_error.log "#server_id = 2 #skip-locking Max_con nections=100 table_open_cache=256 query_cache_size=1m tmp_table_size=32m thread_cache_size=8 innodb_data_h Ome_dir= "c:\job\mysql-5.7.12-winx64/data/" Innodb_flush_log_at_trx_commit =1 innodb_log_buffer_size=128m innodb_ buffer_pool_size=128m innodb_log_file_size=10m innodb_thread_concurrency=16 innodb-autoextend-increment=1000 join_buffer_size = 128M Sort_buffe R_size = 32M Read_rnd_buffer_size = 32M max_allowed_packet = 32M explicit_defaults_for_timestamp=true sql-mode= "ST Rict_trans_tables,no_auto_create_user,no_engine_substitution "Skip-grant-tables #sql_mode =no_engine_substitution
 , Strict_trans_tables ################### #配置文件结束 ###################

The focus is on the following configuration, where DataDir directory name must be: c:\job\mysql-5.7.12-winx64/data/, plus skip-grant-tables, so that root does not lose password, landing

4. In Windows System environment variable path, add the following content
C:\job\mysql-5.7.12-winx64\bin (note plus semicolon)

5, the MySQL registration for Windows system Services
the specific action is to execute the following command on the command line (you need to run the command line as an administrator):

CD C:\Windows\System32
Run as Administrator cmd.exe
need to switch to the bin directory, otherwise the service directory will be specified as C:\job\mysql-5.7.12-winx64\bin

Add Service command: mysqld install MySQL--defaults-file= "C:\job\mysql-5.7.12-winx64\my.ini"

Removal Service command: mysqld remove

6. After the successful 5th step, initialize the data directory
C:\job\mysql-5.7.12-winx64\bin>mysqld--initialize
This step is important, uninitialized, and may cause the MySQL service to fail to start (pit one)

7. Open System service Management
can see the MySQL system service

To start the MySQL command at the command line: net start MySQL

Turn off MySQL command as: net stop MySQL

8, modify the root password
Command line execution:

Mysql–uroot

mysql>show databases;

Mysql>use MySQL;
mysql> Update Mysql.user Set Authentication_string=password (' 12345 ') where user= ' root ' and Host = ' localhost ';

mysql> alter user ' root ' @ ' localhost ' identified by ' 12345 ';

mysql> FLUSH privileges;

Mysql> QUIT

Pit Two: the new version of the MySQL database in the user table has no password field, but the encrypted user password stored in the Authentication_string field

9. Remote Login Configuration
allows the root user to log on remotely from anywhere, with any library operation rights, as follows:

1 login to MySQL with root user on this machine first:

Command-line execution: Mysql-u root-p

Enter password (password set in step 7th): 12345

2) To authorize the operation:

Mysql>grant all privileges in *.* to ' root ' @ '% ' identified by ' 12345 ' with GRANT OPTION;

Overload Authorization Table:

Mysql>flush privileges;

Exit Mysql:quit

(ii) MySQL 5.7.13 installation configuration method

The following is a summary of the previous installation of mysql5.7.13 notes, to share with you.

1. Download

Download Address: http://dev.mysql.com/downloads/mysql/

According to the computer configuration to choose, I chose Windows (x86,64-bit), ZIP Archive This, click Download, page jump to the following figure

Click the bottom no thanks,just start my download to begin the download.

My Mysql installation path is D:\Mysql\mysql-5.7.13-winx64

2. Configure My.ini file, add new Data folder

Create a new My.ini file under the path where MySQL is installed

The following code is written in the My.ini file:

[MySQL]
# set MySQL client default character set
Default-character-set=utf8

[mysqld]
#设置3306端口
port = 3306 
# set MySQL installation directory
basedir=d:\mysql\mysql-5.7.13-winx64
# Set up a directory of Mysql database data
datadir=d:\mysql\mysql-5.7.13-winx64\ Data
# allows maximum number of connections
max_connections=200
# The character set used by the service side defaults to a 8-bit encoded latin1 character Set
Character-set-server=utf8
# The default storage engine to use when creating a new table
Default-storage-engine=innodb

Create a new folder named data

Open cmd

The installation success instructions are OK (my side has been installed, so the service already exist)

3. Start MySQL server

Start Task Manager--click Service

Access to services

Right-key MySQL, click Start or reboot

4. Open MySQL

CMD inside Enter mysql-u root-p, enter password

If you want to reset your password mysqladmin-u root-p password

After entering MySQL, enter show databases;

Enter use MyWeb;

And then enter show tables;

This is the MySQL 5.7.13winx64 installation configuration method, I hope to help you learn.

(iii) MySQL 5.7.14 installation configuration method

The following is the most exciting part for the latest release of the MySQL 5.7.14 installation process to record, I hope to help.

One, MySQL 5.7.14 download

Download Link: http://dev.mysql.com/downloads/installer/

The specific download process is shown in the following picture:

Second, MySQL 5.7 installation

Better installation instructions on the Web:

Article One: http://www.jb51.net/article/84152.htm

Article Two: http://www.jb51.net/article/90275.htm (folder form configuration)

Three, MySQL 5.7 problem Summary

1. The MySQL 5.7 Command line Client opens for a flash-back resolution (shown in the following figure)

Case Description:

Recently in learning SSH, need to use the database, so in the official website to download a MySQL Server, after installation, open command line, always flashing back, very worried, so on the internet to collect some solutions, write in this, and share with you.

1. View some of the parameters of the MySQL Command line Client default execution. Method: Start-> All Programs->mysql->mysql Server 5.7->mysql 5.7 Command line Client, right key property.


2. View the contents of the destination file:


Copy the contents of the file as follows:

"D:\MySQL\MySQL server 5.7\bin\mysql.exe" "--defaults-file=d:\mysql\mysql server 5.7\my.ini" "-uroot" "-P"

3. Go to D:\MySQL\MySQL Server 5.7\my.ini This directory to see if there is no My.ini this file, found that there is only one my-default.ini.


4. Copy My-default.ini, rename to My.ini, problem solving!!!


2. Note that the previously configured root password may be deleted (change root password) in the course of this change

Reference Links: http://www.jb51.net/article/84146.htm (written in more detail)

Note: The above picture content for my own operation can be achieved, the relevant reference links are more comprehensive description.

Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.