MySQL add user and authorization (dbforge studio mysql) graphic details, remote access, mysqldbforge
For Windows 7 32-bit systems, you can use dbforge studio mysql to add users to mysqlMySql, create databases, authorize users, delete users, and change passwords (note that each line is followed by one; end of a command statement ):
1. Create a connection
1.1 log on to MYSQL: Use root to log on.
Test the status
1.2 create a user:
Grant usage on *. * TO 'user01' @ 'localhost' identified by '000000' with grant option;
The red part above is a non-existent user. After executing the preceding statement, a user named username and password is created.
1.3 log on to the system:
Test
2. Authorize the user
Use the root user to log on to the logon page
Use the root user logon mode. Authorization format: grant permission on database. * to username @ login host identified by "password ";
2.1 If You Want To specifySome permissions are granted to a user, which can be written as follows:
Grant select, update on testDB. * to user01 @ localhost identified by '123 ';
Flush privileges; // refresh the system permission list
2.2 authorize the database to remotely log on to user01Permission:
For example, if you want myuser to use mypassword to connect to the mysql server from any host.
Grant all privileges on *. * TO 'myuser' @ '%' identified by 'mypassword' with grant option;
Flush privileges;
If you want to allow myuser to connect to the mysql server from a host with ip address 192.168.1.9, and use mypassword as the password
Grant all privileges on *. * TO 'myuser' @ '192. 168.1.3 'identified BY 'mypassword' with grant option;
Flush privileges;
If you want to allow myuser to connect to the dk database of the mysql server from a host with ip address 192.168.1.9, and use mypassword as the password
Grant all privileges on dk. * TO 'myuser' @ '192. 168.1.3 'identified BY 'mypassword' with grant option;
Flush privileges;
2.3 authorize user01 users to have certain permissions on all databases:
Mysql> grant select, delete, update, create, drop on *. * to user01 @ "%" identified by "123456 ";
// The user01 user has the select, delete, update, create, and drop permissions on all databases.
// @ "%" Indicates authorizing all non-local hosts, excluding localhost. (The localhost address is set to 127.0.0.1. If it is set to a real local address, you do not know if it is OK. No verification is performed .)
// Authorize localhost: add the grant all privileges on testDB. * to test @ localhost identified by '20140901.
Does mysql add user commands? How can I set remote clients to connect to mysql?
In permission settings, set the user's host to "%" or add a user with the same name, if the host is set to "localhost", you can remotely and locally log on to the remote command line. Use the mysql-u username-p password-h server name or IP database name. For more information, see mysql. user Manual
How to Set remote access permissions for MYSQL
I like the permission management method of MYSQL very much. I don't need to remember any commands. I can directly modify the host, user, and other tables in the mysql database, and then restart the server.