MySQL 5.6.26 winx64 Installation configuration graphics and text tutorial (i) _mysql

Source: Internet
Author: User
Tags flush mysql free reserved

Reading Table of Contents
• Download MySQL free installation version
• Configure MySQL Database
MySQL Environment variables
• Install MySQL Database

The company server is a database of Windows development connections using "MySQL"
This essay will describe how to configure the MySQL database without installation version on Windows

First, download MySQL free installation version
• First access to MySQL official website www.mysql.com-->downloads (download)--> Community (community)--> MySQL Community server (MySQL Community server)--> election Optional operating system platform (Windows)
• Below are three optional download files
† The first is the MySQL Installer 5.6 for Windows, download Down is an. msi executable installation file
† The following two are uncompressed versions (Zip version) are Windows (x86, 64-bit) Zip Archive and Windows (x86, 32-bit), Zip Archive
• The author chooses Mysql-5.6.26-winx64.zip, because the author's server version is 64-bit operating system

Second, the configuration MySQL database
• Unzip the downloaded mysql-5.6.26-winx64.zip to the custom directory, where I will extract the compressed package to the D:\mysql-5_x64 directory;
• Open this directory, found that the folder and files inside with a installed MySQL basically no difference
• Modify the MySQL configuration file, in the mysql-5_x64 directory has a my-default.ini, can be counted as a template to use, the content is not a lot! You can create a my.ini as a MySQL profile and open My.ini

[Client]
port=3306
#客户端字符类型, consistent with the service side, suggested UTF8
Default-character-set=utf8
[Mysqld]
#绑定IPv4和3306端口
Bind-address = 0.0.0.0
Port = 3306
#服务端字符类型, suggested UTF8
Character_set_server=utf8
# set the MySQL installation directory
Basedir=d:/mysql-5_x64
# set up a repository of MySQL database data
Datadir=d:/mysql-5_x64/data
# allow maximum number of connections
max_connections=201

• Such a basic MySQL environment required the parameters are enough

Third, the MySQL environment variable
• Right-click the computer--> Properties--> Advanced--> environment variable--> "User variable" new variable mysql_home value D:\mysql-5_x64, "System variable" find the variable path edit at the back;%mysql_ Home%\bin

Four, the installation MySQL database
• Run cmd (Win8, Win10 to admin run cmd)--> enter D:\mysql-5_x64\bin directory
Microsoft Windows [version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\windows\system32>d:
D:\>CD mysql-5_x64
D:\MYSQL-5_X64>CD bin
D:\mysql-5_x64\bin>

• Perform mysqld-install install MySQL
D:\mysql-5_x64\bin>mysqld-install
Service successfully installed

• Execute net start MySQL start MySQL

D:\mysql-5_x64\bin>net start MySQL
D:\mysql-5_x64\bin>net start MySQL
The MySQL service is starting.
MySQL Service has started successfully

Start MySQL service: net start MySQL
Stop MySQL service: net stop MySQL
Remove MySQL Service: SC delete MySQL

• Modify MySQL Password

D:\mysql-5_x64\bin>mysql-u root-p//login MySQL with root
Enter password://password null, enter can
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.6.26 MySQL Community Server (GPL)
Copyright (c), 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark the Oracle Corporation and/or its
Affiliates. Names may trademarks of their respective
Owners.
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql>

mysql> show databases;     Show all databases
+--------------------+ 
| Database   |
+--------------------+ 
| information_schema | 
| MySQL    | 
| performance_schema | 
| 
+--------------------+ 
4 rows in Set (0.00 sec) 

• Access to ' MySQL ' data, delete empty users

mysql> use MySQL; 
Database changed 
mysql> Delete from user where user= '; 
Query OK, 1 row Affected (0.00 sec) 

• Update the password and brush the permissions table to memory (you can also use the Mysqladmin tool to set the password)

mysql> Update User Set Password=password (' 123456 ') where user= ' root ';
Query OK, 4 rows Affected (0.00 sec) 
rows matched:4 changed:4 warnings:0 mysql> flush 
; 
Query OK, 0 rows Affected (0.00 sec) 

• Try Landing

D:\mysql-5_x64\bin>mysql-u root-p     //Login to database with root user 
Enter Password: * * */          /Enter updated password 123456 
Welcome to the MySQL Monitor. Commands End With; or \g. 
Your MySQL Connection ID is 5 
server version:5.6.26 mysql Community Server (GPL) 
Copyright (c), 2015, Orac Le and/or its affiliates. All rights reserved. 
Oracle is a registered trademark to Oracle Corporation and/or its 
affiliates. The other names may is trademarks of their respective 
owners. 
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement. 
Mysql> 

• Open remote connection (give all permissions, allow 192.168.1.x network segments to be connected)

Mysql> Grant all privileges "*.* to ' root" @ ' 192.168.1.% ' identified by ' root ' with GRANT option; 
Query OK, 0 rows Affected (0.00 sec) 
mysql> flush privileges; 
Query OK, 0 rows Affected (0.00 sec) 
mysql> select Host,user,password from user;
+-------------+------+-------------------------------------------+
| host  | user | password         |
+-------------+------+-------------------------------------------+
| 192.168.1.% | Root | *81f5e21e35407d884a6cd4a731aebfb6af209e1b |
+-------------+------+-------------------------------------------+
4 rows in Set (0.00 sec) 

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.