Permissions for MySQL test database

Source: Internet
Author: User

By default, the rows contained in the MYSQL.DB table indicate that any user can access the database at the beginning of the test database and Test_. The value of the user field for these rows is empty, which means matching any user. This means that these databases (the test database and the database beginning with test_) can be used by default by any user, even if they do not have permissions.

Mysql.db Default settings:

In the initialized MySQL environment, the mysql.db table contains the 2-row test database-related configuration by default, causing any user to be free to manipulate the database starting with test or test_, and drop the test database directly if you want to avoid this problem.

For this phenomenon, you may need to pay attention to the following issues:
1, the formal environment do not use the test database or create a database Test_ start to store business data
2, the user's permission to test, verify, do not go to test database, which may mislead you
3. If you want to completely avoid the above problems, you can delete the data related to test mysql.db.

"Database starting with test", if you want to cancel a user's permission to test, you must add a user's record in the Test.db table, each permission is n.

Permissions for MySQL test database

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.