1
votes

How to copy the site on the CMS Drupal? At the moment, I just completed the export of the database, then made a copy of the site from the hosting. And uploaded to the new hosting, in the domain directory, the copied site, and through phpmyadmin imported the database. I got this error ...

Error The website encountered an unexpected error. Please try again later. Error messagePDOException: SQLSTATE[HY000] [1045] Access denied for user 'rvsrru_c1035'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of /home/aufhcrw3/public_html/includes/lock.inc).

4

4 Answers

3
votes

You can use this tutorial

  1. Copy project
  2. Create user and add permission. It's you can change on phpmyadmin

enter image description here

  1. Change settings.php

    $databases = array ( 'default' => array ( 'default' => array ( 'database' => 'yourdatabasename', 'username' => 'databaseusername', 'password' => 'databasepassword', 'host' => 'localhost', 'port' => '', 'driver' => 'mysql', 'prefix' => '', ), ), );

Import DB. As I understand you have already done :)

2
votes

You need to update the settings.php file which is located in sites/default, and add the right database connection credentials. You'll also need to search and replace any references to the old URL to the new URL in your database, but that's not the problem you're facing right now and is best addressed by another question / google search

Have you read the documentation on this? Migrating a site

2
votes

@Gariko, please change database credentials in settings.php file. Update database name, database user and password of new environment. Check for host also. After this clear cache by drush, via db tables or admin.

0
votes

If who have this promblem. Reading please this is site - https://www.drupal.org/docs/7/backing-up-and-migrating-a-site/migrating-a-site Next step. Create new user for DB in phpmyadmin or cpanel. And change setting in file - seting.php. See above!