How to install the configuration mysql-5.7.4-m14-winx64 (installation record) _ MySQL

Source: Internet
Author: User
Tags change settings
Win764-bit how to install configuration mysql-5.7.4-m14-winx64 (installation records) win7

How to install and configure mysql-5.7.4-m14-winx64 under win7 64-bit

1. download mysql-5.7.4-m14-winx64.zip

Http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17-winx64.zip

2, extract to D:/mysql. (path specified by yourself) 3, in D:/mysql/mysql-5.7.4-m14-winx64 New my. ini configuration file

The content is as follows:

#################### Start of the configuration file ################# ##

# For advice on how to change settings please see

# Http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

# *** Do not edit this file. It's a template which will be copied to

# *** Default location during install, and will be replaced if you

# *** Upgrade to a newer version of MySQL.

[Client]

Default-character-set = utf8

[Mysqld]

Port = 3306

Basedir = "D:/mysql/mysql-5.7.4-m14-winx64 /"

Datadir = "D:/mysql/mysql-5.7.4-m14-winx64/data /"

Tmpdir = "D:/mysql/mysql-5.7.4-m14-winx64/data /"

Socket = "D:/mysql/mysql-5.7.4-m14-winx64/data/mysql. sock"

Logs-error = "D:/mysql/mysql-5.7.4-m14-winx64/data/mysql_error.log"

# Server_id = 2

# Skip-locking

Max_connections = 100

Table_open_cache = 256

Query_cache_size = 1 M

Tmp_table_size = 32 M

Thread_cache_size = 8

Innodb_data_home_dir = "D:/mysql/mysql-5.7.4-m14-winx64/data /"

Innodb_flush_log_at_trx_commit = 1

Innodb_log_buffer_size = 128 M

Innodb_buffer_pool_size = 128 M

Innodb_log_file_size = 10 M

Innodb_thread_concurrency = 16

Innodb-autoextend-increment = 1000

Join_buffer_size = 128 M

Sort_buffer_size = 32 M

Read_rnd_buffer_size = 32 M

Max_allowed_packet = 32 M

Explicit_defaults_for_timestamp = true

SQL-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION"

# SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES

#################### End of configuration file ################## #


The focus is on the following configuration where the datadir directory name must be: D:/mysql/mysql-5.7.4-m14-winx64/data /.

4. add the following content to the path of the windows environment variable:

D:/mysql/mysql-5.7.4-m14-winx64/bin; (note the plus points)


5. Register mysql as a windows system service

The specific operation is to execute the following command in the command line (you need to run the command line as an administrator ):

Add Service Command: mysqld install MySQL -- defaults-file = "D:/mysql/mysql-5.7.4-m14-winx64/my. ini"

Command: mysqld remove


6. after step 1 is successful, open system service management

You can see the mysql system service (note this ):

You need to configure the administrator user login in the mysql service login attribute (if you do not configure startup from service management, the error 1035 is reported, and the startup failure is reported on the command line startup)

Start mysql in the command line: net start mysql

Run the following command to disable mysql: net stop mysql.

7. change the root password to 123456.

Command line execution: mysql-uroot

Mysql> show databases;

Mysql> use mysql;
Mysql> UPDATE user SET password = PASSWORD ('000000') WHERE user = 'root ';

Mysql> flush privileges;

Mysql> QUIT

8. now you can connect to the client on the local machine (SQLyog is used). there is a system Library named mysql 9 and remote login configuration.

Allow the root user to log on remotely anywhere and have any operation permissions on all databases. the specific operations are as follows:

1) log on to mysql using the root user on the local machine:

Command line execution: mysql-u root-p

Enter the password (the password set in step 1): 7th

2) perform authorization:

Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'youpassword' with grant option;

Reload authorization table:

Mysql> flush privileges;

Exit mysql: quit

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.