Phpmyadmin creates database users (local, any host) and phpmyadmin Databases

Source: Internet
Author: User
Tags sql using

Phpmyadmin creates database users (local, any host) and phpmyadmin Databases
Phpmyadmin User Creation



You can use phpmyadmin to create a database user and Set permissions. Both User Creation and permission configuration are simple.



Root User


It is used to create any user and can assign all permissions. The super administrator of mysql, of course, belongs to a local user.



Local user


A local user provides access to the database for the same host as the database. A user can have a password or no password. Local users cannot connect to remote SQL using the client tool (phpmyadmin, sqlyog, etc,

Regardless of the user's permissions, even if all users, regardless of the user's password, cannot connect to remote SQL.



Arbitrary host user


Any Host user provides access to the database for different hosts than the database. The user can have a password or no password. Any Host user cannot log on to the Database Host.

(If the password of any host user with ownership is blank, you can log on to the l local database, but you do not have the permission to create a database. You can only view the test and information_schema databases that come with mysql)



Create a database user


Select "Add User" next to "Number 1" to create various database users. Then, select "reload permission" to refresh the "user overview" column at "Number 3.


P.S number 3 user description

% Represents any host user, and localhost represents a local user

Users of user1, user2, and user3 can directly log on to the local database (although any host user, but the password is blank), and permissions are lost. Of course, if you log on from another host client, the permission is maintained.

User5 users can directly log on to the local database to maintain their permissions. You cannot log on from another host client.

User6 users cannot log on to the local database directly, but can log on from other host clients to maintain their permissions.

Users of user7 and user8 can directly log on to the local database to maintain their permissions. You cannot log on from another host client.



PHPmyadmin adds a user's database permission

Log On with the root account,
Select "permission ",
Select the user you want to edit,
Operation (edit permission ),
Uncheck all options in "Global Permissions;
Continue to "specify permissions by Database" ----- add permissions to the following databases ------ use a text domain, select A1 (page Jump) ------- follow the permissions specified by the database and check all options ----- execute;
Log out of phpmyadmin and log on with a new user. Now you can only see that A1 cannot see A2;
Different phpmyadmin versions may have different options;
References: original

How does php create a mysql user database and set database permissions?

1. Use PhpMyAdmin to create a MySQL user.
1. Use root to log on to phpmyadmin.
2. Click permissions.
3. Create a user
4. Select all permissions.
Run
2. Use Visual operation software, such as phpmyadmin and mysqlcc.
Or use the command line to Create Database name
III. for example
Create a user vap and assign permissions: All Tables of the database vap can be accessed from all machines (the first sentence) and local machines (the second round), and have any permissions. The password is vap.

Grant all privileges on vap. * to 'vap '@' % 'identified by 'vap ';
Grant all privileges on vap. * to 'vap '@ 'localhost' identified by 'vap ';

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.