avlolm Posted May 8, 2014 Share Posted May 8, 2014 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 More sharing options...
bellini13 Posted May 8, 2014 Share Posted May 8, 2014 The only file you need to change is /config/settings.inc.php Make sure the following parameters are correct _DB_SERVER_ _DB_NAME_ _DB_USER_ _DB_PASSWD_ _DB_PREFIX_ Link to comment Share on other sites More sharing options...
avlolm Posted May 8, 2014 Author Share Posted May 8, 2014 The only file you need to change is /config/settings.inc.php Make sure the following parameters are correct _DB_SERVER_ _DB_NAME_ _DB_USER_ _DB_PASSWD_ _DB_PREFIX_ all are corect... there is something in the old store files that make the store only work with original DB (works with it) any other DB dose not connect. the same thread i have t in instaling section with more. It is incredible nobody know what happens.... Link to comment Share on other sites More sharing options...
bellini13 Posted May 9, 2014 Share Posted May 9, 2014 the only file that matters is /config/settings.inc.php, there are no other files that control database connection settings, unless you have made customizations or overrides. If all the settings are "correct" then you should report the issue to your host to understand why it is not working. Link to comment Share on other sites More sharing options...
rcriche Posted May 9, 2014 Share Posted May 9, 2014 I have a similar problem... Link to database cannot be established: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client it seems the problem is on php version... I'm looking for a solution and made some other tests unsuccessfully so far Link to comment Share on other sites More sharing options...
avlolm Posted May 9, 2014 Author Share Posted May 9, 2014 I have a similar problem... it seems the problem is on php version... I'm looking for a solution and made some other tests unsuccessfully so far yes seems different, mine works with original db but dose not work with any other DB. In other words it works but not with original files added to other db then the original one. Link to comment Share on other sites More sharing options...
rcriche Posted May 9, 2014 Share Posted May 9, 2014 yes seems different, mine works with original db but dose not work with any other DB. In other words it works but not with original files added to other db then the original one. I found information that the problem can be password hash: http://www.magentocommerce.com/boards/viewthread/713781/ Link to comment Share on other sites More sharing options...
avlolm Posted May 13, 2014 Author Share Posted May 13, 2014 I found information that the problem can be password hash: http://www.magentocommerce.com/boards/viewthread/713781/ 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 More sharing options...
avlolm Posted May 13, 2014 Author Share Posted May 13, 2014 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...? 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! 1 Link to comment Share on other sites More sharing options...
bellini13 Posted May 13, 2014 Share Posted May 13, 2014 why would you do step 1 and 3? what exactly are you trying to accomplish? migrating a store from one server to another is very simple 1) export database from old server 2) import database into new server 3) backup website content from old server 4) restore website content to new server 5) (optional) if the db name, username and password have changed, then you need to update settings.inc.php. If they remain the same, then there is no reason to change. Link to comment Share on other sites More sharing options...
avlolm Posted May 14, 2014 Author Share Posted May 14, 2014 why would you do step 1 and 3? what exactly are you trying to accomplish? migrating a store from one server to another is very simple 1) export database from old server 2) import database into new server 3) backup website content from old server 4) restore website content to new server 5) (optional) if the db name, username and password have changed, then you need to update settings.inc.php. If they remain the same, then there is no reason to change. because from now one( or just for some peaople ) that way wont work!!!!!!!!!!!!!!!! the db will refuse to connect. Only changing username pass and db name wont work you need a settings.inc file created on that new server with hush etc... on it... the old settings.inc files transplanted into the new server will never work!!!! changing only the normal details as we use to know by now... Link to comment Share on other sites More sharing options...
bellini13 Posted May 14, 2014 Share Posted May 14, 2014 i think you are severely confused and over complicated a simple process to migrate the store. The process I defined does work, it is a simple matter of performing the steps properly. Either way, I'm glad to hear your store is functioning now, but I would advise anyone else reading this thread, don't follow avlolm steps to migrate your store, just do it right the first time Link to comment Share on other sites More sharing options...
avlolm Posted May 14, 2014 Author Share Posted May 14, 2014 i think you are severely confused and over complicated a simple process to migrate the store. The process I defined does work, it is a simple matter of performing the steps properly. Either way, I'm glad to hear your store is functioning now, but I would advise anyone else reading this thread, don't follow avlolm steps to migrate your store, just do it right the first time i have migrated more then 50 shops by now... i know the procedure with my eyes closed. Trust me, for some users modify the setting.inc file (changing db name, user, password) will not work db will refuse to connect even if all infos are correct. Reson: one way or another is verifying the hush key that settings.inc contains and will refuse conection. it can be because of the host, php version or latest 1.6 prestashop version (i`lll go for the php version of my host). dosent mather i repet some user will need a settings.inc file created on that new server and not a transplanted one. if you do not belive me i can give you acces to my account and see you doing the "right simple way" it will refuse conection!!! maybe my host or my php version is the problem but i bet there will be more confrunting the problem, it taked me 1 week to solve it daily trys....hours of trying and searching...if one user will be helped by my post then i am happy. migrating a shop is a lame simple procedure.... trust me i am right. Link to comment Share on other sites More sharing options...
bellini13 Posted May 15, 2014 Share Posted May 15, 2014 Since you didn't actually provide any details about your environment, people have to make certain assumptions. Are you using MSSQL database server? Link to comment Share on other sites More sharing options...
avlolm Posted May 15, 2014 Author Share Posted May 15, 2014 Since you didn't actually provide any details about your environment, people have to make certain assumptions. Are you using MSSQL database server? my host provider is using cPanel and acces DB via php myadmin. Is using MySql. i migrated the shop from one account to another using same host provider (same type of server etc...) Link to comment Share on other sites More sharing options...
bellini13 Posted May 16, 2014 Share Posted May 16, 2014 Ok good, so we agree that you are using mysql database Reson: one way or another is verifying the hush key that settings.inc contains and will refuse conection. What is a "hush key"? There is no such setting in the settings.inc.php file. I already provided to you the only settings that effect connecting to the mysql database. I will repeat them again for you so that you can tell me which one of these is the "hush key" _DB_SERVER_ _DB_NAME_ _DB_USER_ _DB_PASSWD_ _DB_PREFIX_ Link to comment Share on other sites More sharing options...
avlolm Posted May 16, 2014 Author Share Posted May 16, 2014 Ok good, so we agree that you are using mysql database What is a "hush key"? There is no such setting in the settings.inc.php file. I already provided to you the only settings that effect connecting to the mysql database. I will repeat them again for you so that you can tell me which one of these is the "hush key" Yes look here: this figures are different. define('_COOKIE_KEY_', 'vbufdjshkshfwplbidjoe4riclomafuqysc1wioyyc5jinjghhtdjwgmfxff'); define('_COOKIE_IV_', 'x5iasjkhfksabgm'); define('_PS_CREATION_DATE_', '2014-05-13'); define('_PS_VERSION_', '1.6.0.6'); define('_RIJNDAEL_KEY_', 'LzJsjkdfhdksCHbr7Z5pNHtZPzLCan'); define('_RIJNDAEL_IV_', 'y4aCmMsalkfjhjsdjf0uhhdEcGvA=='); Link to comment Share on other sites More sharing options...
bellini13 Posted May 16, 2014 Share Posted May 16, 2014 those keys have nothing to do with connecting to mysql database. you are simply misinformed and confused. Link to comment Share on other sites More sharing options...
avlolm Posted May 17, 2014 Author Share Posted May 17, 2014 those keys have nothing to do with connecting to mysql database. you are simply misinformed and confused. OK then please can you let me know why is not connecting? i am: -making copy of filles and move them to new server, on new server i create using cPanel a db and using phpMyAdmin inside i upload the old db content after making a coy of it ofcourse. -go to config-settings.inc and change db name, db username and username password (ps_ prefix and localhost remain the same) save the changes and then try to conect to BO...now upssss error (the one specifyd already...acces denied for username to db....bla bla..) why? can you explain? after week of testing i have seen that it only works with a settings.inc file created inside that server and not with the one from the backuped files that i modify with new correct details, beacause even if normaly should connect for some reaseons it refuses connection. Finally i am not a a football player neither dancer or a PHP expert but i can see that the only difference between the setting.inc file that works and the one transplanted and modifyd that is no good are...the exact lines that you say have nothing to do with connection. i am not expert: i want to see experts explaining this for us non educated ones thanks! Link to comment Share on other sites More sharing options...
bellini13 Posted May 17, 2014 Share Posted May 17, 2014 The steps you laid out are correct, but obviously you did something incorrect or different from what you say. Link to comment Share on other sites More sharing options...
ctcamp Posted October 25, 2014 Share Posted October 25, 2014 (edited) Hi there i thought i should share how i was able to successfully move my site to a new domain: www.procape.co.za First: i tried avlolm advice in regards to the post -13 May 2014 - 10:16PM 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. My shop loaded successfully from the back end and front end, however, i had almost no data on my site. Secondly i tried Moving PrestaShop to a New Domain Here are the main steps when moving PrestaShop to a new domain within the same server. These are mostly a simpler version of the above steps – we do not touch the data, which stays on the same MySQL server. Put your shop in maintenance mode, so as to not lose new customers or orders will moving the data. Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "No". Move your files Make a backup of all the files: connect to your FTP server, and copy all the files and folders to your local hard-drive. Transfer your files to your new host: Connect to the FTP server for your new host, and copy all the files and folders that you just downloaded to your local hard-drive, as is. Configuration On the new server, open the /config/settings.inc.php file and update the settings for the new database server (with your own settings instead of the examples here): define('_DB_SERVER_', 'sql.domainname.com'); define('_DB_NAME_', 'prestashop'); define('_DB_USER_', 'PS-user'); define('_DB_PASSWD_', 'djsf15'); define('_DB_PREFIX_', 'ps_'); (1.4 and earlier) In that same file, update the Base URI setting ('/' being the server root): define('__PS_BASE_URI__', '/prestashop/'); Log in to your Back Office, go to the "Preferences" tab, select the "SEO & URLs" sub-tab, and change the domain name to your new domain. Do the same for the SSL domain. In effect, this will update the "PS_SHOP_DOMAIN" and "PS_SHOP_DOMAIN_SSL" rows in the "ps_configuration" SQL table. In your back-office, go to the "Tools" tab, "Generators" sub-tab, and regenerate both the .htaccess and robots.txt files. Connect to your new FTP server and delete everything except the index.php files in the following folders: /tools/smarty/cache /tools/smarty/compile /tools/smarty_v2/cache /tools/smarty_v2/compile Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "Yes". After this i wanted to configure the file: settings.inc.php, i noticed a file called: settings.old.php. i renamed the original settings.inc.php to settings.inc.phpOLD and configured the settings.old.php and renamed it to settings.inc.php My site is working i lost about 30 images, but it is not too much of a big deal. i will upload them again. Thank you to all the information, i took me about a week, but i learned a lot It will be advisable to increase the site memory Read about that herewww.prestashop.com/forums/topic/3314[spam-filter]prestashop-memory-limit/?do=findComment&comment=1677252 Edited October 26, 2014 by ctcamp (see edit history) Link to comment Share on other sites More sharing options...
misu3108 Posted November 27, 2014 Share Posted November 27, 2014 Ok, so I moved my site from local server to live server and after I copied the contents imported the database and changed the settings.inc.php and changed the domain to the live one and all the other settings in the database, I get the same error: SQLSTATE[28000] [1045] Access deniedWhat I did because I have a VPS I used the commands apt-get update apt-get upgrade reboot and then rebooted It worked after the reboot. I hope it helps... I'm using PS 1.6.0.9 Link to comment Share on other sites More sharing options...
rgangwani Posted November 30, 2014 Share Posted November 30, 2014 The only file you need to change is /config/settings.inc.php Make sure the following parameters are correct _DB_SERVER_ _DB_NAME_ _DB_USER_ _DB_PASSWD_ _DB_PREFIX_ thank you so much, was having this issue since 20 days, i was afraid that my site pfactory.in would be lost.. but this simple thing solved it..!! 1 Link to comment Share on other sites More sharing options...
Recommended Posts