MySQL login configuration

Source: Internet
Author: User
Tags mysql login


Grant all privileges on *. * TO root @ "%" identified by 'abc'; mysql> select user, host, password from mysql. user; + ------ + ----------- + ------------------ + | user | host | password | + ------ + ----------- + ------------------ + | root | localhost | root | wengdev01 | root | 127.0.0.1 | | localhost | wengdev01 | root | % | 7b49a39922703c30 | + ------ + ----------- + ------- ----------- + 6 rows in set (0.00 sec) delete from mysql. user WHERE Host <> '%' and user = 'root'; mysql> select user, host, password from mysql. user; + ------ + ---------------- + | user | host | password | + ------ + ------------------ + | root | % | 7b49a39922703c30 | + ------ + ------------------ + 1 row in set (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) # Or delete from mysql. user where password = ''or user =''; update mysql. user set host = '%' where user = 'root'; grant all privileges on *. * TO root @ "%" identified by 'abc'; flush privileges; create a user and grant all permissions except administration. Grant create, DROP, grant option, REFERENCES, EVENT, ALTER, DELETE, INDEX, INSERT, SELECT, UPDATE, lock tables, TRIGGER, create temporary tables, create view, show view on *. * TO cs @ "%" identified by 'abc ';
Author jqjyy

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.