Use MySQL;
Grant USAGE on *. user_name ' @ ' localhost ' identified by ' 123456 ' with Grant option;//authorized user_name user to access the database with password 123456
Grant Select,insert,update,delete on db_name.* to ' user_name ' @ ' localhost ' identified by ' 123456 ';//authorized user_name user Access Db_ Name all tables of the database. Access rights [Select,insert,update,delete]
FLUSH privileges;//must have
= = Suddenly the leader says I want to access your data. Then tragedy, how to support remote connection? = = convert localhost to%. localhost means only local access
Use MySQL;
GRANT USAGE on *. user_name ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
GRANT select,insert,update,delete on db_name.* to ' user_name ' @ ' percent ' identified by ' 123456 ';
= = Sister's, or can not access, pay attention to shutting down your firewall = =
"Record work problems" MySQL licensing issues