While not a MySQL topic, as most of my readers view my MySQL Blog, my WordPress blog has been hacked? Has yours?
Like many, I’m sure you may have read about it like at WordPress blogs under attack from hack attack but I was surprised when my custom permlinks did not work.
Being surprised I looked at Administrator accounts, and I found that there was one more number then being displayed in the list. I had to dig into the database to find the problem.
mysql> select * from wp_users where ID in (select user_id from wp_usermeta where meta_key = 'wp_capabilities' and meta_value like '%admin%'); +-----+-------------+------------------------------------+---------------+------------------------------+---------------------------+---------------------+---------------------+-------------+--------------+ | ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name | +-----+-------------+------------------------------------+---------------+------------------------------+---------------------------+---------------------+---------------------+-------------+--------------+ | 1 | admin | $P$BHZFK/prDplb/W/024yrH49JvAmmCE. | ronald | ronald.bradford@xxxx.xxx.xx | http://ronaldbradford.com | 2005-11-21 23:43:47 | | 0 | Ronald | | 127 | ronald | $P$B..e75VtFsv9bUGj5H5NTiXXPQIitr1 | ronald | ronald.bradford@xxxxx.xxx | http://ronaldbradford.com | 2009-02-22 20:13:33 | | 0 | ronald | | 133 | ChaseKent87 | $P$Bl8cVSzBums33Md6u2PQtUVY2PPBHK. | chasekent87 | | | 2009-09-05 06:36:59 | | 0 | ChaseKent87 | +-----+-------------+------------------------------------+---------------+------------------------------+---------------------------+---------------------+---------------------+-------------+--------------+ 3 rows in set (0.00 sec) mysql> delete from wp_users where ID=133; mysql> delete from wp_usermeta where user_id=133;
However the damage has been done, and an update to the recommend 2.8.4 is unlikely to fix the data corruption.
Being a good DBA I have a nightly backup of my database. Being a diligent system administrator, I have not 1 copy, by 3 copies of my system, one on my web site and two offsite.
The problem is I don’t keep older backups of my data, only a day old version.