This does look like you've been hacked. re-install all of the wordpress files and then to reset the user password, type the password in plain text within phpmyadmin and then select function md5 and your root password will reset for you.