Setting up a dev server, copy of live site

Ludachris

Well-known member
I had the host copy all the files and the database over to a new cpanel user. I've logged in via FTP and adjusted the config file to point to the new database. I'm getting a db error when I bring up the site... I'm accessing it via a mapped hosts file. The host has verified the db can be accessed via the command line. Is there anything else that needs to be changed to bring the site up so I can access the admincp and change the URL setting in options?
 
Does the source code of the page bring up anything when you view it?

PS. Deleted my last post. Missed the part with the database >_>
 
What kind of db error?
What is the exact message as that will determine whether you need to view the page source, look in the admin log, or check the server error log.

The Board URL setting in the options has nothing to do with the error and won't prevent XF loading - it is primarily for emails and other functions.
 
Error reads: "An unexpected database error occurred. Please try again later."

I viewed source and it's saying:

<!-- Access denied for user 'db_user'@'localhost' to database 'db_name' -->

Problem is, the db_user is different than the one specified in the config file - it's referencing the db_user set in the live config file, which I've changed on the dev site. I've checked it several times.
 
Problem is, the db_user is different than the one specified in the config file - it's referencing the db_user set in the live config file, which I've changed on the dev site. I've checked it several times.
new mysql db user you specified on dev site hasn't been assigned privileges to the db name listed in xf config.php file on dev site
 
new mysql db user you specified on dev site hasn't been assigned privileges to the db name listed in xf config.php file on dev site
I had assigned ALL privileges to that db user. If that isn't enough should I create a new db user then?

And I used that guide to get through it all Brogan, thanks.
 
I just deleted the db user on the new site via cpanel, created a new one with the same name to ensure the user has full privileges and the error still displays. It's still referencing the wrong db user in the view source code.
 
Why would the source code reference a user that is different from that of the one specified in the config file? It's reading the correct db name, just the wrong user.
 
I had assigned ALL privileges to that db user. If that isn't enough should I create a new db user then?

And I used that guide to get through it all Brogan, thanks.

for cpanel it's 2 separate steps

1. assign privileges to mysql user
2. assigning and associating mysql user to database
 
Why would the source code reference a user that is different from that of the one specified in the config file? It's reading the correct db name, just the wrong user.
Try using a different name. I think I had this issue at one point and I resolved it by using a different name to the one I had last. All permissions were checked but no luck until I made everything over using different details (and make sure to update config.php with the new details).
 
for cpanel it's 2 separate steps

1. assign privileges to mysql user
2. assigning and associating mysql user to database
Yup... I did those two steps, multiple times now. I've created a new user with a different name, updated the config file to reflect the new user. Still same issue. The source code is reflecting the old user from the old config file. This doesn't make any sense.
 
I don't know if this is your problem. This is how I fixed that problem using centos 7. login to your mysql through centos 7 then type this:

GRANT ALL ON *.* TO root@'your ip' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;

Where is says your ip put in your ip and where it says root put your username and password where it says password
 
Back
Top Bottom