In Linux, mysql creates accounts and permission settings. 1. permission granting Description: mysql is deployed on server A, and host B on the Intranet connects to server A through client tools for database operations, server A needs to grant host B the permission to operate mysql 1.1 to log on to mysql on server A. Assume that the mysql account on server A is root: mysql-u root-p, and then press enter to enter the password!
1.2 grant database operation permission to host B mysql> grant usage on *. * to username@192.168.0.1 identified by 'Password'; Note: grant the username@192.168.0.1 the permissions to use all databases and log on with the username account on host 192.168.0.1 with the password: password www.2cto.com mysql> grant all privileges on newdb. * to username@192.168.0.1; Description: Give the username@192.168.0.1 operation database newdb maximum permissions, on host 192.168.0.1 using username Account Login, no password example: mysql> grant all privileges on *. * to root@192.168.0.1 identified by '20140901'; Note: grant the root@192.168.0.1 the permissions to use all databases and log on with the root account on host 192.168.0.1 with the password: 1234562, remove account mysql> drop user root@192.168.0.1; Note: Remove account root, in this way, host 192.168.0.1 can no longer use the root user operation server A on the database author Language