Mysql 5.6.26 winx64 installation and configuration graphic tutorial (1), 5.6.26winx64

Source: Internet
Author: User

Mysql 5.6.26 winx64 installation and configuration graphic tutorial (1), 5.6.26winx64

Reading directory
• Download the MySQL installation-free version
• Configure the MySQL database
• MySQL Environment Variables
• Install the MySQL database

The company server is connected to a database developed by Windows and uses "MySQL"
This article describes how to configure the MySQL database installation-free edition on Windows.

1. Download the MySQL installation-free version
• First, go to the MySQL official website www.mysql.com --> Downloads --> Community (Community) --> MySQL Community Server (MySQL Community Server) --> select the operating system platform (Windows)
• There are three optional download files.
The first one is MySQL Installer 5.6 for Windows. The downloaded file is an. msi executable Installation File.
The decompress version (Zip version) is Windows (x86, 64-bit) ZIP Archive, Windows (x86, 32-bit), and ZIP Archive.
• I chose mysql-5.6.26-winx64.zip because my server version is 64-bit OS

2. Configure the MySQL database
• Unzip the downloaded mysql-5.6.26-winx64.zip to the custom directory, where I will extract the package to the D: \ mysql-5_x64 directory;
• Open this directory and find that the folders and files in it are basically the same as those of a installed MySQL.
• Modify the MySQL configuration file, there is a mysql-5_x64 under the my-default.ini directory, can be counted as a template to use, the content inside is not a lot! You can create my. ini as the MySQL configuration file and open my. ini.

[Client]
Port = 3306
# The client character type, which must be the same as that of the server. utf8 is recommended.
Default-character-set = utf8
[Mysqld]
# Binding IPv4 and 3306 ports
Bind-address = 0.0.0.0
Port = 3306
# Server character type. utf8 is recommended.
Character_set_server = utf8
# Set the installation directory of mysql
Basedir = D:/mysql-5_x64
# Set the directory for storing mysql database data
Datadir = D:/mysql-5_x64/data
# Maximum number of connections allowed
Max_connections = 201

• The parameters required for such a basic MySQL environment are enough.

Iii. MySQL Environment Variables
• Right-click this computer --> properties --> advanced --> environment variable --> "User variable" new variable MYSQL_HOME value D: \ mysql-5_x64, "System variable" is added after editing the variable path; % MYSQL_HOME % \ bin

4. Install the MySQL database
• Run cmd (Win8, Win10 run cmd as Administrator) --> 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>

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

• Execute net start mysql to start MySQL

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

Start MySQL service: net start mysql
Stop MySQL service: net stop mysql
Delete MySQL service: SC delete mysql

• Change the Mysql password

D: \ mysql-5_x64 \ bin> mysql-u root-p // use root to log on to mysql
Enter password: // The password is empty. Press Enter.
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) 2000,201 5, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql>

Mysql> show databases; // display all databases + -------------------- + | Database | + -------------------- + | information_schema | mysql | performance_schema | test | + ------------------ + 4 rows in set (0.00 sec)

• Enter 'mysql' data and 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 refresh the permission table to the 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 privileges; Query OK, 0 rows affected (0.00 sec) 

• Login Attempt

D: \ mysql-5_x64 \ bin> mysql-u root-p // use the root user to log on to the database Enter password: * ***** // enter the 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) 2000,201 5, Oracle and/or its affiliates. all rights reserved. oracle is a registered trademark of Oracle Corporation and/or its affiliates. other names may be trademarks of their respective owners. type 'help; 'or' \ H' for help. type '\ C' to clear the current input statement. mysql>

• Enable remote connection (grant all permissions to allow access from 192.168.1.x network segments)

mysql> grant all privileges on *.* 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) 

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.