Windows MySQL 5.6 zip installation and create user-given database permissions

Source: Internet
Author: User

1. download MySQL 5.6 Zip

  Download MySQL 5.6 Zip first (on the official website (http://www.mysql.com/downloads/) or any other site), then unzip it on your computer D:\java\mysql-5.6.22-winx64 Finally, add D:\java\mysql-5.6.22-winx64\bin to the environment variable path to facilitate direct command operation

2. Order Preparation before installation

Locate the unpacked My-default.ini File open (recommended notepad++ here)

Add these two variables inside

basedir=d:\java\mysql-5.6.22-winx64 where MySQL is located
Datadir=d:\java\mysql-5.6.22-winx64\data Data Location

3. Start the installation command

This requires administrator privileges, or it will report no permissions issues.

Go to the Bin folder of the installation directory: Mysqld-install service successfully installed indicates successful installation

4. Start the service:

net start MySQL in Task Manager--service to see if there is a MySQL service

5. Log in to MySQL

Mysql-u root-p (first login without password, press ENTER directly)

6. Create a new User:

Insert into Mysql.user (Host,user,password) VALUES ('% ', ' test ', Password (' Test ')); % means connecting from any address

Flush privileges; Refresh system tables

7. Create a database:

Create Database TestDB;

8. Assigning permissions to users:

Authorization format:

Grant all privileges the testdb.* to [e-mail protected] identified by ' Test ';

Flush privileges;//Refresh System Permissions Table

Windows MySQL 5.6 zip installation and create user-given database permissions

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.