Hi,

I'm new in this area, so I need help.
I installed xampp and drupal and made an improvised site on local host. I also created a database using xampp's mySQL.
I found a webhost and want to put my site on it. Following the instructions for beginners(which tell what to du , if you don't have a drupal site) , I created a new database in phpMyadmin through the web host. and I Uploaded the whole drupal folder to the web host. So now if i go to the root domain(I don;t know if I express myself right) http:/example.com, there are the folder and if I try to open htdocs, there is the error:
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'bn_drupal'@'localhost' (using password: YES) in lock_may_be_available() (line 167 of /users/vre-tv/www/drupal/htdocs/includes/lock.inc).

I know there is already answer as to this error, but I've created two databases, is that the matter ? Or what schoud I do?
Thank you

Comments

JamesOakley’s picture

You'll have a settings.php file in your Drupal installation (probably in -/sites/default), and in there will be the database username and password from your xampp installation.

As well as creating a new database on your new web hosting package, you also need to create a database user. You then need to change settings.php so that the database username and password match those you've used on your new web host.

You probably also need go grant permissions to your MySQL user so that it can access and operate the database you've created.

Finally, if you haven't already done so, you need to use phpMyAdmin to import the content of your Drupal database from your xampp site.

If you need help creating database users, assigning database users to databases, or importing the old database, your best bet is to ask your new web host for support.


This signature is currently blank
steinade’s picture

Thank ou verry much for the answer, I'll try to follow the instructions to see my drupal site on the web.

steinade’s picture

Hallo,
I chaned tne database name and the username and password. Was the chenge of the database name a mistake. And now I can't reverse it.

steinade’s picture

Hi,

Can you give me one more advice.
'Finally, if you haven't already done so, you need to use phpMyAdmin to import the content of your Drupal database from your xampp site.'
I don't know what folder from htdocs or drupal I should import in the webhost database. What folder contains the database data from drupal?
Thank you very much!

JamesOakley’s picture

The database isn't in a folder in your xampp installation.

You need to go to phpMyAdmin in xampp, and use "export" to export your database from there. Choose the option to export to file, rather than viewing the export on screen. That will give you a file (ending in .sql, or .sql.gz, or .zip, or something). You then give that file to the server's phpMyAdmin import screen.


This signature is currently blank
AdamGeek’s picture

Hi,

It seems from the above error message, you dont have enough permission. Please try to give full permission and then please retry