Sep 30

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

Sep 30

I was dealing with a ColdFusion application at work that had locked an Access database and the customer was very upset. Access databases become locked when they are being edited, an .ldb file is generated with the same name.  I usually resolve this issue with a trick of running a query against an existing table with a non-existant column name. Don’t ask me how this works but it does -> http://www.hostmysite.com/support/programming/locked-db/

In this situation no .ldb file was generated, my quirky query didn’t do the trick, and the ColdFusion app was still throwing ODBC errors stating ‘admin’ had locked the database.

This was on a live, shared web server so I couldn’t just reboot. All I needed to do in fact was copy the .mdb somewhere, rename it, and update it in some way. I then deleted the original file and renamed the copied one back and the web application could then perform its tasks. No reboot, no connection string updating. The summary is, if you are still using Access for a web application you should migrate it to MySQL or MS SQL.

Hosted by HostMySite.com