Sunday, December 30, 2012

How to reset wordpress admin password?

I have a wordpress and lost its admin password. We can change the admin password via. phpmyadmin.

logging into phpMyAdmin and click databases.
A list of databases will appear. Click your WordPress database.
All the tables in your database will appear. If not, click Structure
Look for wp_users
Click on the icon for browse.
Locate your Username under user_login
Click edit
Your user_id will be shown, click on Edit
Next to the user_pass is a long list of numbers and letters.
Select and delete these and type in your new password.
Type in the password you want to use. Just type it in normally, but remember, it is case-sensitive.
Once you have done that, click the dropdown menu indicated, and select MD5 from the menu.
Check that your password is actually correct, and that MD5 is in the box.
Click the 'Go' button to the bottom right.
Test the new password on the login screen. If it doesn't work, check that you've followed these instructions exactly.

http://codex.wordpress.org/Resetting_Your_Password

How to disable STRICT_MODE in mysql ?

Login to mysql server
# Check global settings for strict mode
mysql> select @@GLOBAL.sql_mode;
+--------------------------------------------------------------+
| @@GLOBAL.sql_mode                                            |
+--------------------------------------------------------------+
| STRICT_ALL_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+--------------------------------------------------------------+

# Remove settings
mysql> SET GLOBAL sql_mode="";
   
# Verify
mysql> select @@GLOBAL.sql_mode;
+-------------------+
| @@GLOBAL.sql_mode |
+-------------------+
|                   |
+-------------------+