import subscribers from remote MySQL

Sergio

New Member
I try import subscribers from remote MySQL but error:
  • Your form has a few errors, please fix them and try again!
    CDbConnection failed to open the DB connection.
Any idea why?
 

twisted1919

Administrator
Staff member
Hi,

Seems the app cannot connect to that server.
Make sure the remote server allows external connections(by default mysql only allows connections from localhost as far as i remember) and that the credentials are all fine.

Thanks.
 

Sergio

New Member
Hi, I usually connect to the same DB with Navicat and with other remote app on VPS and I allow external web servers to access the MySQL adding access host with the IP of the remote host and the data is ok for access.
 

twisted1919

Administrator
Staff member
Hi,

In this case, how about you take a look into the mysql error log to see what exactly happens ?
 

twisted1919

Administrator
Staff member
From command line, look into /var/log folder on the server, you should either have a mysql folder inside with a error.log file or you have a mysql_error.log file in /var/log folder.

Once you identify the file, you can simply do a
Code:
cat /var/log/log-file-name
to see the contents, thus the errors.
 

Sergio

New Member
I can't see a file for mysql error :S
ssh_screen.jpg
 

twisted1919

Administrator
Staff member
Most probably you are using CentOS 7 which will install MariaDB instead of MySQL, but it's fine, at the moment, both are pretty much the same thing.
So, you should actually look into the mariadb folder and you should see a "mariadb.log" file, then just:
Code:
cat /var/log/mariadb/mariadb.log
Right after you try to connect from mailwizz to import so that the last thing in the log will be the connection error messages.

Thanks.
 

twisted1919

Administrator
Staff member
Seems that the database server tries to resolve your RDNS and it cannot do it because the ip address from where the connection is made does not have a RDNS.
You could either ask your host to add a RDNS record for your ip, which is what you should do, your ip addresses must always have RDNS or you can disable dns lookup in the database server, which might in turn affect you at some level. It's described here: http://www.percona.com/blog/2008/05/31/dns-achilles-heel-mysql-installation/

P.S: RDNS stands for Reverse DNS.

Thanks.
 

Sergio

New Member
For the moment I use and accessing to Mailwizz direct with the IP dont have associate a domain. Can be this the problem for RDNS?
 

twisted1919

Administrator
Staff member
Nope. RDNS is an entirely different thing, it's like when you run from command line a ping command like:
Code:
ping mailwizz.com
and you get back
Code:
[root@work-01 ~]# ping mailwizz.com
PING mailwizz.com (72.14.191.6) 56(84) bytes of data.
64 bytes from web-mailwizz-01.onetwist.com (72.14.191.6): icmp_seq=1 ttl=63 time=0.694 ms
64 bytes from web-mailwizz-01.onetwist.com (72.14.191.6): icmp_seq=2 ttl=63 time=0.621 ms
64 bytes from web-mailwizz-01.onetwist.com (72.14.191.6): icmp_seq=3 ttl=63 time=0.503 ms
64 bytes from web-mailwizz-01.onetwist.com (72.14.191.6): icmp_seq=4 ttl=63 time=0.481 ms

Here, the RDNS for mailwizz.com, which sits on 72.14.191.6, is web-mailwizz-01.onetwist.com

If i didn't had RDNS (or disable rdns lookup) and i would run the same command, i would get:
Code:
Serbans-MacBook-Pro:~ cristi$ ping mailwizz.com
PING mailwizz.com (72.14.191.6): 56 data bytes
64 bytes from 72.14.191.6: icmp_seq=0 ttl=49 time=181.484 ms
64 bytes from 72.14.191.6: icmp_seq=1 ttl=49 time=178.745 ms

Which is almost the same thing, but still different.

Hope it makes sense :)
Thanks.
 

twisted1919

Administrator
Staff member
Just try to disable DNS lookup from /etc/my.cnf as shown in the link i gave you earlier, then restart mariadb and see if you can go over this.
After you are done importing, you can add back the dns lookup.

Thanks.
 
Top