Softaculous


Topic : transfer wordpress from ampps to cpanel


Posted By: view on October 27, 2015, 1:49 pm
Hello

This is my first time to use ampps.I`m finished with creating new wordpress website on localhost using ampps and website work perfect on localhost but when i zipped all from /www/ folder and export mysql from phpmyadmin and upload all that on new empty cpanel account i get this error on live server

Error establishing a database connection

I`m checked least 5 times all database login details and wp-confing.php file and all is ok.Than i enabled wp_debug and now get this error

Warning: mysql_connect(): Access denied for user 'hostmedi_H022J'@'localhost' (using password: YES) in /home/hostmedia/public_html/wp-includes/wp-db.php on line 1482

I`m tested mysql server on my cpanel server and he work without problems,i have other websites on same server who use mysql and there is no other problems,only with this website which is moved from ampps.

What can be a problem?

Posted By: nikhil89 on October 28, 2015, 9:55 am | Post: 1
Hi,

Check if the database user has access to the database. You will need to assign the database to the database user.

Posted By: view on October 28, 2015, 9:57 am | Post: 2
That is checked lest 5 times

Posted By: view on October 28, 2015, 9:17 pm | Post: 3
Problem is on my side :)


In old config.php,line for password looks this
define('DB_PASSWORD', '(xu5PaS4[8)');

When i transfered files to my cpanel server and created new database i also created new db user and new password,for example new password is MNjdhgURR3 and when i edited config.php i set my new password in line,like this
define('DB_PASSWORD', '(MNjdhgURR3)');

But my mistake is because old password have ( on start and ) on end.My problem is resolved when i type password to be like this
define('DB_PASSWORD', 'MNjdhgURR3');

It`s very stupid problem,and take me a lot of hours to figure where is the problem.Sorry for disturb you.


Posted By: nikhil89 on October 29, 2015, 5:49 am | Post: 4
Hi,

We are glad to know that your issue has been resolved. Please let us know if you need any further assistance. We will be happy to help you.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.