Add a user and authorize MySQL (dbforgestudiomysql) graphic explanation, remote access

Source: Internet
Author: User

Add a user and authorize MySQL (dbforgestudiomysql) graphic explanation, remote access
For Windows 7 32-bit systems, you can use dbforge studio mysql to add users to mysqlMySql, create databases, authorize users, delete users, and change passwords (note that each line is followed by one; end of a command statement ):

1. Create a connection

1.1 log on to MYSQL: Use root to log on.


Test the status


1.2 create a user:

Grant usage on *. * TO "user01 '@ 'localhost' identified by '000000' with grant option;

The red part above is a non-existent user. After executing the preceding statement, a user named username and password is created.

1.3 log on to the system:

 

Test


2. Authorize the user

Use the root user to log on to the logon page

Examples/eIG9uIMr9vt2/4i4qIHRvINPDu6fD + 0C1x8K81ve7 + examples + cjxwpjxpbwcgc3jjjpq = "" alt = "\">

 2.1 If You Want To specifySome permissions are granted to a user, which can be written as follows:

Grant select, update on testDB. * to user01 @ localhost identified by "123456 ';

Flush privileges; // refresh the system permission list

2.2 authorize the database to remotely log on to user01Permission:

For example, if you want myuser to use mypassword to connect to the mysql server from any host.
Grant all privileges on *. * TO 'myuser' @ '%' identified by 'mypassword' with grant option;
Flush privileges;
If you want to allow myuser to connect to the mysql server from a host with ip address 192.168.1.9, and use mypassword as the password
Grant all privileges on *. * TO 'myuser' @ '192. 168.1.3 'identified BY 'mypassword' with grant option;
Flush privileges;
If you want to allow myuser to connect to the dk database of the mysql server from a host with ip address 192.168.1.9, and use mypassword as the password
Grant all privileges on dk. * TO 'myuser' @ '192. 168.1.3 'identified BY 'mypassword' with grant option;
Flush privileges;

2.3 authorize user01 users to have certain permissions on all databases:

Mysql> grant select, delete, update, create, drop on *. * to user01 @ "%" identified by "123456 ";

// The user01 user has the select, delete, update, create, and drop permissions on all databases.

// @ "%" Indicates authorizing all non-local hosts, excluding localhost. (The localhost address is set to 127.0.0.1. If it is set to a real local address, you do not know if it is OK. No verification is performed .)

// Authorize localhost: add the grant all privileges on testDB. * to test @ localhost identified by '20140901.

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.