After re-installing WP, I found that the original user name could not be logged on. I was prompted that the permission was insufficient and I had reached the level. I found a solution. Here I will record it!
The procedure is as follows:
Log on to phpmyadmin-> Select database-> Click SQL and enter the following statement:
UPDATE wp_options SET option_name = REPLACE (option_name, 'WP ', '51php ');
UPDATE wp_usermeta SET meta_key = REPLACE (meta_key, 'WP ', '51php ');
Conclusion: After executing the preceding two SQL statements, you can successfully log on to the Wordpress website background,
Add a detailed process:
Solution: Open the * _ options table, find the column where the optionname field value is * _ user_roles, and change it to the prefix you modified (* indicates the actual prefix ).
Open the * _ usermeta table, and set the value of the old prefix in the meta-key field to OK if the new prefix is changed.
The SQL statement is as follows. After selecting a database in phpMyAdmin, click SQL in the toolbar to execute the following statement:
Update 'new _ usermeta' set 'meta _ key' = replace ('meta _ key', 'old _ ', 'New _') WHERE 'meta _ key' like "% old _ % ";
The above is only an example. You have to modify it based on the prefix of the new and old tables:
Here, "new _" indicates the new prefix after modification. "old" indicates the prefix before modification. After modification, run the command!
In fact, the above SQL code is part of the MySql replacement statement. I will not study it together:
For example, replace Welcom to in the the_table table the_subject field with welcome:
Update 'The _ table' set 'The _ subobject' = replace ('The _ subobject', 'Welcome to ', 'Welcome') where instr ('The _ subobject ', 'Welcome to')> 0