Jump to content

MIGRATION PROBLEM SQLSTATE[28000] [1045] Access denied


Recommended Posts

Link to database cannot be established: SQLSTATE[28000] [1045] Access denied for user 'XXX'@'localhost' (using password: YES)

Evrithing is correct!!! settings.inc with corect name of DB corect name of user corect and password of DB is corect.....and it is not conecting!!!!! why??? what should i do?? This after migration. On clean instal it conects to DB but, after i muve files from old store to the new one stops conecting to DB.

what are dose files containing from the old shop and i have to change besides settings.inc???

URGENT PLS

Link to comment
Share on other sites

hello

are you able to test these credentials ?

create simple php file: dbtest.php

with text:
 

<?PHP
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()) 
?>

upload it to your server, and try to open it in browser.

 

what you see then?

Link to comment
Share on other sites

hello

are you able to test these credentials ?

create simple php file: dbtest.php

with text:

 

<?PHP
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()) 
?>

upload it to your server, and try to open it in browser.

 

what you see then?

what should i put in the your.hostadress.com? if i put localhost it shows blank page if i put my domain name it says Access denied for user 'tvysmdhg_321'@'cphost01.qhoster.net' (using password: YES)

Link to comment
Share on other sites

if you see blank page with "localhost" it means that everything with database connection is okay.

are you 100% sure that your settings.inc.php file contains correct database credentials

I have verifyd 10 times, settings.inc is correct with pasword db name and db user.... It conects without the old store files...after i upload old store files it just says error cannot conect o database....

Link to comment
Share on other sites

if you see blank page with "localhost" it means that everything with database connection is okay.

are you 100% sure that your settings.inc.php file contains correct database credentials?

also please note that if i connect store to old database with files hosted into new host it works (hosts are from the same provider). but when i ask it to coect to the new database or any other database dose not work. With other files it works so it must be something in the files of the old store that only allow conection to the original database. Please note that i have deleted chache and compile as needed so that is not the problem....

Link to comment
Share on other sites

also please note that if i connect store to old database with files hosted into new host it works (hosts are from the same provider). but when i ask it to coect to the new database or any other database dose not work. With other files it works so it must be something in the files of the old store that only allow conection to the original database. Please note that i have deleted chache and compile as needed so that is not the problem....

NOBODY knows how to migrate a shop??? i am doing all OK but new shop refuses to conect to new database...why? where is the problem? user name password all is changed? is there posible to migrate a shop to a new host, retorical question...?

Link to comment
Share on other sites

perhaps it is time for you to hire a professional that knows how to migrate a store and configure the mysql database properly. 

 

You could also try to document the exact steps/procedures you took to migrate the store and database, so it is clear what you have done, and perhaps it will become obvious what you did wrong.

 

I'd also reconsider your tone when asking the community for assistance, you will likely not receive additional help with such a negative tone.

Link to comment
Share on other sites

perhaps it is time for you to hire a professional that knows how to migrate a store and configure the mysql database properly. 

 

You could also try to document the exact steps/procedures you took to migrate the store and database, so it is clear what you have done, and perhaps it will become obvious what you did wrong.

 

I'd also reconsider your tone when asking the community for assistance, you will likely not receive additional help with such a negative tone.

 

 

After 1 week of work i finaly done it. If you ask me unless it is a new change some profesionals from prestashop should hae explain it by now.

 

here it is:

- migrating the shop by the steps prestashop explains it it is not enought. All the change is in the settings.inc file. IT WILL NOT WORK IF YOU CHANGE only db user and password and db name. You need to change all the infos like hush and salt of password. In the past worked but seems that from now one or for some cases it is not enought.

 

my fix:

1.Install on the new host prestashop clean install manualy or by softoculus if you have cpanel. Then copy only the settings.inc file

2.then delete all files and upload the files from the old store

3.on the data base already created by the fresh install login with php my admin and import old db

4. change the setting.inc file from the old files with the saved one from the clean install.

5. DONE

 

have fun guys!

Link to comment
Share on other sites

After 1 week of work i finaly done it. If you ask me unless it is a new change some profesionals from prestashop should hae explain it by now.

 

here it is:

- migrating the shop by the steps prestashop explains it it is not enought. All the change is in the settings.inc file. IT WILL NOT WORK IF YOU CHANGE only db user and password and db name. You need to change all the infos like hush and salt of password. In the past worked but seems that from now one or for some cases it is not enought.

 

my fix:

1.Install on the new host prestashop clean install manualy or by softoculus if you have cpanel. Then copy only the settings.inc file

2.then delete all files and upload the files from the old store

3.on the data base already created by the fresh install login with php my admin and import old db

4. change the setting.inc file from the old files with the saved one from the clean install.

5. DONE

 

have fun guys!

 

Hi, thanks for outlining what worked for you. Quick question, what PrestaShop version was the old database and what version was the new migration? 

Link to comment
Share on other sites

Hi, thanks for outlining what worked for you. Quick question, what PrestaShop version was the old database and what version was the new migration? 

old one was last version 1.6 new one same 1.6. maybe is something with the php versions but i used the same host provider. I only changed the account. so is a 1.6 version new problem or a php problem. This i am not sure. I am using cpanel so db name will allways be diffrent with my host provider. What i can be sure is that is verifying hush as well so in able to connect you need a settings.inc file created on the new server. Using the old modifyd one will not connect ( maybe if you change hush and salt i never try this)

have fun!

Link to comment
Share on other sites

  • 4 months later...

have fun guys!

 

Your step by step instructions are a bit far from step by step ;)

 
The installation
  1. You can read all about restore/backup from 2013 here on PS (didnt work for me, should be updated)
  2. Download the latest PS installation file from here mine was 1.6.0.9
  3. Upload it to your sever (if your host doesnt have inst. file)
  4. Unzip it
  5. Run the setup file for ex. www.yourdomain.com/prestashop
  6. Follow the instructions on screen
  7. You might need to create a new database via phpmyadmin panel
  8. Connect your installation with new database
  9. You have fresh spanking new Prestashop (default) and it should work.
It was a bit tricky to work out at which point i should copy the settings.inc.PHP file, as you have to run the installation file first and then delete the install folder. 
I didnt have the file until I've completed the installation process.
 
The settings.inc.PHP file from your existing shop might not work because;
  • database name is different (can be changed in new)
  • username is different (can be changed in new)
  • password is different (can be changed in new)
  • prefix  (can be changed in new)
 
Also, there are other things different;
  • define('_COOKIE_KEY_'
  • define('_COOKIE_IV_',
  • define('_RIJNDAEL_KEY_',
  • define('_RIJNDAEL_IV_',
I didnt know If I can changed them or not. (edit: I didnt know at the time i was writing this, but cookie_key was important later)
 
The backup/restore
  1. Drop all tables in your new database via phpmyadmin
  2. Backup your new settings.inc.PHP file in /prestahop/config/

     

  3. At this point you should have an empty folder from the new installation

     

  4. Backup database on your existing site (via backup DB or phpmyadmin)
  5. Backup template/theme on you existing site (not sure why, but did it)
  6. Backup all your folders/files on your existing site

     

  7. Upload your existing site folders/files to a new site
  8. Import your existing database to your new database via phpmyadmin

     

  9. Change your existing file settings.inc.PHP with database, user, password, prefix (you have created this in previous steps)

    NOTHING ELSE, just that.

     

  10. You should be up and running.
Im not.....
 
Restoring Admin password
 
As you might not be able to log in, as the correct password (you might think its correct) is not working, you will have to reset it.
The email option didnt work for me, even I had my email set, but never received a new password. (need to work on it...)
 
Follow instructions here or here (by Vekia)
 
 
.. the End
 
Give it a time, clear cache, and it should all come up.
 
It was a pain to work it out, but I'm thanking everyone here, as everyone had some sort of imput ;)
 
Thanks all 
 
 
PHP: 5.5.16
PS: 1.6.0.9
Default theme

MySQL 5.5.34

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...