Hi,
I migrate my Drupal 7 site from web hosting A to hosting B.
Under Hosting A, I used following SSH to backup folders and files:
tar --create --gzip --verbose --file=files_backup.tgz site_foldername
and used following SSH to backup database:
mysqldump -uhosta_admin -ppassworda --add-drop-database hosta_databasename > database_backup.sql
---------------------------
So, I have two files of the whole website backup:
files_backup.tgz
database_backup.sql
-----------------------------
On the web hosting b, I create an empty database (hostb_databasename) with user hostb_admin
I used following SSH to restore database:
mysql -uhostb_admin -ppasswordb hostb_databasename < database_backup.sql
and used following SSH to restore folders and files:
tar -xvzf files_backup.tgz
-------------------------
Next step, I updated the sites/defaule/settings.php file with the database, username and possword associated with web hosting b.
------------------------
I assume everything would be fine, but when I open website, I got following error:
Error
The website encountered an unexpected error. Please try again later.
PDOException: SQLSTATE[28000] [1045] Access denied for user 'hostb_admin'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of /home5/******/public_html/includes/lock.inc).
----------------------