I'm trying to connect to an application. There was a power failure that corrupted the hard drive, and after taking a backup from it externally, I've managed to get the application back up. Looking at the files it seems fine, the database is there too. But mysql won't connect.
I get
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myuser'@'localhost' (using password: YES) in C:\wamp\www\testmysql.php on line 2
where line 2 is simply:
$link = mysql_connect('localhost','myuser','mypassword');
I can still access PHPMYADMIN fine, and run queries, and browse tables. But I got this when trying to browse the table action_log
:
The error says:
SQL query:
SHOW FULL FIELDS FROM `action_log`:
MySQL said:
#29 - File '.\mypath\action_log.MYD' not found (Errcode: 2)
It's a Windows machine. Where do I find that file? And do I need to do this? Howto: MySQL InnoDB corruption auto-repair after power failure?
Edit
I should add that when I run this, it works:
$link = mysql_connect('localhost','admin','');
Where/how can I restore the other users? Whether by files or via DB?