Announcement

#1 2015-11-06 12:18:42

jduino
Guest

Menalto2piwigo - can't connect to Menalto database

Greetings,

I'm trying to convert a Gallery3 install but I've hit a blocker. I've followed the help steps shown on the plugin page:
1) Copy the content of  var/albums (Gallery3) into piwigo/galleries
2) Ran synchronize
3) Submit the form.....and this is where it fails.

Piwigo is on HostA. Gallery3 is on HostB. I have granted permission on Gallery3's database access from HostA, and confirmed from the commandline. When I submit the form I get the error below (I added some info to the error message to confirm my input).

This is my input:
database host: HostB:3306  (also just tried 'HostB' with identical results)
database name: gallery3
database user: galleryuser
database password: ***
table prefix: g3
column prefix: <blank>

I have sniffed the wire and never actually see any traffic between HostA and HostB. iptables/firewalld and sestatus are all disabled.

<SNIP>
Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on 'HostB' (13) in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 67

Warning: my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822

Warning: my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822
Piwigo encountered an unrecoverable error.

[mysql error ]
Can't connect to server
host: HostB
user: galleryuser
password: *****
dbname:
port: 3306
socket:
database: gallery3

#1    my_error /var/www/html/plugins/menalto2piwigo/include/functions.inc.php(17)
#2    m2p_db_connect /var/www/html/plugins/menalto2piwigo/admin.php(143)
#3    include_once /var/www/html/admin/plugin.php(62)
#4    include /var/www/html/admin.php(288)

</SNIP>

And this appears in the httpd/error_log:
[Fri Nov 06 03:09:07.733021 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on 'HostB' (13) in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 67, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733193 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733214 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733304 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Fatal error:  [mysql error ] \nCan't connect to server\nhost: HostB\nuser: galleryuser\npassword: ***\ndbname: \nport: 3306\nsocket: \ndatabase: gallery3\n#1\tmy_error /var/www/html/plugins/menalto2piwigo/include/functions.inc.php(17)\n#2\tm2p_db_connect /var/www/html/plugins/menalto2piwigo/admin.php(143)\n#3\tinclude_once /var/www/html/admin/plugin.php(62)\n#4\tinclude /var/www/html/admin.php(288) in /var/www/html/include/functions_html.inc.php on line 388, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733396 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  mysqli::real_escape_string(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 233, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733419 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 132, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733430 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733438 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  my_error(): Couldn't fetch mysqli in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 822, referer: http://HostA/admin.php?page=plugin-menalto2piwigo
[Fri Nov 06 03:09:07.733446 2015] [:error] [pid 26319] [client LAPTOP:42126] PHP Warning:  [mysql error ] \n\nREPLACE INTO piwigo_sessions\n  (id,data,expiration)\n  VALUES('C0A82rup6jf8di375u0gvlvsbnncq6','',now())\n; in /var/www/html/include/dblayer/functions_mysqli.inc.php on line 830, referer: http://HostA/admin.php?page=plugin-menalto2piwigo

Am I missing something obvious?

Piwigo version: 2.7.4 (via netinstall, on CentOS7)
PHP version: 5.4.16
MySQL version: mariadb-server-5.5.44-1.el7_1.x86_64
Piwigo URL: http:// - not available on Internet yet

 

#2 2015-11-06 13:17:03

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: Menalto2piwigo - can't connect to Menalto database

Can you connect via the command line to the remote host?  There is no magic there, so I don't think you're missing anything except the obvious, can't connect to remote...

Offline

 

#3 2015-11-06 15:35:17

jduino
Guest

Re: Menalto2piwigo - can't connect to Menalto database

Yes, no problems connecting via commandline with the same credentials.

 

#4 2015-11-06 16:18:16

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: Menalto2piwigo - can't connect to Menalto database

Looking at your input, (and going from memory only) I don't think you'd need to specify the :port on the end of your hostname, as that's the default port and is assumed.  Again, just guessing and suggesting based off my memory of my conversion.


EDIT: Sorry, just read your original as you tried without the port info.

Offline

 

#5 2015-11-06 20:47:59

Jduino
Guest

Re: Menalto2piwigo - can't connect to Menalto database

Correct I tried with and without :3306. I only tried it as the plugin parses for it. Both ways I see zero traffic via tcpdump.

 

#6 2016-01-20 01:50:29

ferkee
Guest

Re: Menalto2piwigo - can't connect to Menalto database

I'm getting the exact same errors trying to import from G3. 

Have you had any success since your last post?

Thanks in advance,
John

 

#7 2016-01-20 03:34:04

ferkee
Member
2016-01-20
2

Re: Menalto2piwigo - can't connect to Menalto database

[Forgive me - previous post was made before I had registered]

I'm getting the exact same errors trying to import from G3. 

Have you had any success since your last post?

Thanks in advance,
John

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact