Problem with migrating database

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
lucas
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 25 Apr 2015, 21:31

Problem with migrating database

Postby lucas » 25 Apr 2015, 21:46

I ran to this problem when I tried to migrate the ttrss database from one server to another. And I can't get my head around what's the issue.

So I started with a working ttrss installation with web server and database server on the same machine and I wanted to migrate the database (mariadb in both cases) to another server. So I dumped the database and loaded it on the new server, created the ttrss database user, made the firewall adjustments.

So currently, from the command line on the web server I can do the following
mysql -h 192.168.1.100 -D ttrss -u ttrss -p
and it connects fine.
But when I edit config.php to point to the new database server it gives me the following when I browse to the web page

Unable to connect to database (as ttrss to 192.168.1.100, database ttrss): Permission deniedUnable to connect to database (as ttrss to 192.168.1.100, database ttrss): Permission deniedUnable to connect to database (as ttrss to 192.168.1.100, database ttrss): Permission denied

Any ideas what I'm missing?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Problem with migrating database

Postby fox » 25 Apr 2015, 22:27

maybe you should ask about your mysql problems on a mysql forum

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: Problem with migrating database

Postby HeikoAdams » 25 Apr 2015, 22:57

Did you recreate the database user too and did you grant him accessing the database from remote?

AngryChris
Bear Rating Master
Bear Rating Master
Posts: 135
Joined: 08 Apr 2013, 02:42

Re: Problem with migrating database

Postby AngryChris » 26 Apr 2015, 00:48


lucas
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 25 Apr 2015, 21:31

Re: Problem with migrating database

Postby lucas » 26 Apr 2015, 10:23

I just made one edit in config.php and that was on the DB_HOST variable.

I created the ttrss user on the new database with the following commands
CREATE USER 'ttrss'@'%' IDENTIFIED BY 'password';
and
GRANT ALL PRIVILEGES ON ttrss.* to 'ttrss'@'%' WITH GRANT OPTION;

and as I said I can connect to the new database whilst I'm on the web server with the following command
mysql -h 192.168.1.100 -D ttrss -u ttrss -p

lucas
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 25 Apr 2015, 21:31

Re: Problem with migrating database

Postby lucas » 26 Apr 2015, 20:24

With a bit more digging it turned out to be a SELinux issue. Had to give the following command
setsebool -P httpd_can_network_connect 1
Then it worked.

Sorry for the noise.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 7 guests