MySQL database permissions issues, and solutions

Source: Internet
Author: User
Tags mysql version

Previously installed with the MySQL database directly with the root user, you can log on the command line, or through remote operation, since MySQL was acquired by Oracle, found that the permissions may be more detailed than before, the installation Environment Win 7 X64,mysql version Server versions: 5.5.32 MySQL Community Server (GPL), after installation, found that only from the local login, but not through remote access, and later on the Internet to find information, found that the MySQL database root user's host changed to% and execute
FLUSH privileges;
After execution, sure enough to find that you can log in remotely, but the local use localhost login, or with 127.0.0.1 login is not logged, query data MySQL user permissions found root users have three Linux system, this can not be considered, The remaining two permissions for the same user name are different, and one has a password, the other has no password, has been tested

UPDATE USER SET select_priv= ' y ', insert_priv= ' y ', update_priv= ' y ', delete_priv= ' y ', create_priv= ' y ', drop_priv= ' y '
, reload_priv= ' y ', shutdown_priv= ' y ', process_priv= ' y ', file_priv= ' y ', grant_priv= ' y ', references_priv= ' y ',
index_priv= ' y ', alter_priv= ' y ', show_db_priv= ' y ', super_priv= ' y ', create_tmp_table_priv= ' y ', lock_tables_priv= ' y ',
execute_priv= ' y ', repl_slave_priv= ' y ', repl_client_priv= ' y ', create_view_priv= ' y ', show_view_priv= ' y ', create_ routine_priv= ' Y ',
alter_routine_priv= ' y ', create_user_priv= ' y ', event_priv= ' y ', trigger_priv= ' y ', create_tablespace_priv= ' y '
WHERE host= ' localhost ' and user= ' root '


UPDATE USER SET password= ' *81f5e21e35407d884a6cd4a731aebfb6af209e1b ' WHERE host= ' localhost ' and user= ' root '

FLUSH privileges;
Discover that you can log in with Locahost, so that you have a deeper understanding of MySQL data permissions.

MySQL database permissions issues, and solutions

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.