To create an admin user without database access you can use this code.
to use
create a file containing the code e.g. tempadmin.php
change the values of username, password and email
upload to wp-content/mu-plugins directory
delete the file after you are in