Whatever else you do: Keep a backup of your MySQL DB first.
MOVE the whole WP directory to somewhere else (as a backup and as a reference).
Now, copy (the original - download if you have to) WP files into the place (which is now empty) reeking of your misdeed.
Create wp-config.php from wp-config-sample.php and edit the values to whatever you gave before. If you don't remember the password, set a new password there and then go to phpmyadmin and set the same password (make sure to select MD5) there.
You should be alright, except for the loss of plugins and themes. For them, you will have to copy them over and install again.