Mysql database permission issues and solutions
In the past, after directly installing mysql database and using the root user, you can log on to the command line or remotely perform operations. Since mysql was acquired by oracle, the permissions may be more detailed than before, installation environment Win 7x64, mysql version Server version: 5.5.32 MySQL Community Server (GPL), after installation, it is found that you can only log on from the local, but not through remote access, later, I searched for information on the Internet and found that I changed the root user's host in the mysql database to % and executed
Flush privileges;
After the execution, we found that we could log on remotely. However, when we log on locally using localhost or logging on with 127.0.0.1, we found that we could not log on again, query data mysql user permissions found that the root user has three linux systems, this can be ignored, the remaining two have different permissions for the same user name, and a password, another one without a password, tested
Update user set select_priv = 'y', Insert_priv = 'y', Update_priv = 'y', Delete_priv = 'y', Create_priv = 'y', Drop_priv = 'y'
, Reload_priv = 'y', Shutdown_priv = 'y', Process_priv = 'y', File_priv = 'y', Grant_priv = 'y', References_priv = 'y ',
Index_priv = 'y', alter_priv = 'y', show_db_priv = 'y', super_priv = 'y', Create_tmp_table_priv = 'y', Lock_tables_priv = 'y ',
Execute_priv = 'y', Repl_slave_priv = 'y', Repl_client_priv = 'y', create_view_priv = 'y', Show_view_priv = 'y', create_routine_priv = 'y ',
Alter_routine_priv = 'y', Create_user_priv = 'y', event_priv = 'y', trigger_priv = 'y', Create_tablespace_priv = 'y'
Where host = 'localhost' and user = 'root'
Update user set password = '* 81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' where host = 'localhost' and user = 'root'
Flush privileges;
I found that I can log on with locahost. Now I have a deep understanding of mysql Data permissions.