/* Add three common modes by using the mysql grant command */
1. grant all PRIVILEGES on *. * to 'test' @ 'localhost' IDENTIFIED by '123'
2. grant all PRIVILEGES on *. * to 'test' @ '% 'identified by '123'
3. grant all PRIVILEGES on *. * to 'test' @ '10. 22.225.18 'identified by '123'
Note:
1. Add a local user 'test', which is generally used when the web server and database server are together.
2. Add a user 'test', which can be used by any machine that can connect to the database server. This is dangerous and generally not required.
3. Add a user 'test' to the '10. 22.225.18 'machine on the database server, which is generally used when the web server and the database server are separated.
Note: grant all PRIVILEGES on *. * is not used, but related permissions are set as needed.
For example, in common cases, grant select, insert, delete, update on test. * to 'test' @ 'localhost' identified by '123'