Ever migrated a Wordpress blog and ended up using a new domain name? You won’t be able to get in wp-admin due to the fact that WordPress redirects based on 2 values in the wp_options table. Below are the update queries you can run to update the URL in the MySQL database. You need access to phpMyAdmin, the MySQL prompt or you can execute it via PHP.
mysql> USE databasename;
mysql> update wp_options set option_value = ‘http://jw0rd.net’ where option_name = ‘home’ or option_name = ’siteurl’;
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0