Resolved an issues with the change_database_username.php script. The mysql.db and mysql.user tables were being corrected updated, however, the issue was that MySQL doesn't actually have a rename option. (They used to have RENAME DATABASE dbname, but it was dropped due to potential loss of data) Added a rename() call to change /var/lib/mysql/dbname to then new dbname. The side-effect of this issue, was that if you change the username again, it wouldn't find the DB, since it was never renamed in the first place. Also, this means that the change_username.sh script will not work if you've got databases on an external box, since a MySQL query won't be able to rename the directory.