Mysql new user and authorized remote connection operation

Source: Internet
Author: User

1: Login to MySQL terminal as root

Mysql-uroot-pmysql

2: Create WX User, note password to add single quotation mark

Mysql> create user wx identified by ' WX ';

3: Create WX Database

Mysql>create database wx;

4: User WX authorized to have all the permissions of the WX database

Mysql> Grant all on wx.* to [e-mail protected] identified by ' WX ';

If you want to grant all permissions to user wx:

Mysql>grant all on * * to [e-mail protected]alhost identified by ' WX ';

5: Refresh the System Permissions table

mysql> flush Privileges;

6: Log out of root user to WX user

Mysql-uwx-pwx

View database information MySQL> show Databases; +--------------------+| Database           |+--------------------+| information_schema | | wx                 |+--------------------+

7: Authorization to allow remote links

All hosts (%) with WX user login password are allowed to link access and grant all permissions:

' WX '@'%'wx'0 rows affected ( 0.00 sec)

Remote link Test

[Email protected]:~$ mysql-uwx-pwx-h Public network Ip-dwx

Mysql new user and authorized remote connection operation

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.