Method to solve the MySQL access permission setting: first enter the mysql execution directory and enter [mysqld-shareware.exe], then enter [mysql --user=root mysql]; then enter [mysql''gt] , operate through the prompt.
##More related free learning recommendations: mysql tutorial(Video)
Solution to MySQL access permission setting:
Access permission setting method one
Use Grant command to authorize, enter the code as follows:mysql"gt;GRANT ALL PRIVILEGES ON *.* TO system@localhost IDENTIFIED BY 'manager' WITH GRANT OPTION;
Access permission setting method two
Set each permission of the user: mysql"gt;INSERT INTO user valueS('localhost','system',PASSWORD('manager'), 'Y', 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y ');For the 3.22.34 version of MySQL, there are a total of 14 ""Y"", and their corresponding permissions are as follows (arranged in field order): Permission table column names corresponding explanation and scope of useselect Select_priv Only requires select permission when retrieving from a tableinsert Insert_priv allows you to insert new rows into an existing table tableupdate Update_priv allows you to update the list of rows in an existing table with new values delete Delete_priv allows you to delete rows that meet the conditions in the table create Create_priv allows you to create a new database and table database, table or Indexdrop Drop_priv Drops (delete) existing databases and tables Database or tablereload Reload_priv Allows you to tell the server to re-read the authorization table Server Managementshutdown Shutdown_priv may be Abuse (denying service to other users by terminating the server) Server Administrationprocess Process_priv Allows you to view the plain text of the currently executing query, including setting or changing passwords Query Server Administrationfile File_priv Permissions Can be abused to read any readable file on the server into a database table File access on the servergrant Grant_priv allows you to grant the same permissions you have to other users database or tableIf you create a user with only select, insert, update, and delete permissions, the user is allowed to perform operations only on existing tables in one database. Now we can create the database we want to use, we enter it directly. For example: if we want to create a database named XinXiKu, we can use the following code:references References_priv allows you to open and close the record file database or table index Index_priv allows you to create or discard (delete) the index table alter Alter_priv allows you to change the table, can be used to pass Rename the table to **permission system table
mysql"gt;create database XinXiKu;
The above is the detailed content of What should I do if I need permission to access mysql?. For more information, please follow other related articles on the PHP Chinese website!