/** Create a new user * * Log in to the root user using the command line tool or IDE. (Command: Mysql-u root-p)*/--Execute SQL statement insert user, want to use password method unified encryption, otherwise can't use. INSERT intoMysql.User(HOST,USER, Password,ssl_cipher,x509_issuer,x509_subject)VALUES('localhost','Harlan', PASSWORD'123456')/** If you encounter a field ' ssl_cipher ' doesn ' t with a default value error in execution, it is because the Ssl_cipher and other fields do not have defaults, which can be resolved by modifying the MySQL my.ini configuration file. * Change sql-mode= "strict_trans_tables,no_auto_create_user,no_engine_substitution" to Sql-mode= "NO_AUTO_CREATE_USER,NO_ Engine_substitution "Restart MySQL after*/ --refresh MySQL permissions related tableFLUSHPrivileges; --authorization database, the default user does not have the task database operation permission, then needs authorization. GRANT All Privileges onTest.* toHarlan@localhostIdentified by '456789';