Error message after first mysql...

User 402303 Photo


Registered User
5 posts

I get this error message after I click send:

Warning: [ err 2/line 74/datasavemysql.cls.php] PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known
Failed to open database [2002] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known.

What am I doing wrong?
Thanks Horst
User 187934 Photo


Senior Advisor
20,190 posts

It appears that you don't have your info entered in the form builder correctly to connect to your database.
Dbl check those with your server to make sure their correct.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 402303 Photo


Registered User
5 posts

Hello Eric,

I had a typo which I corrected, but now this error message appears:

Failed to open database [1044] SQLSTATE[HY000] [1044] Access denied for user 'web80'@'%' to database 'usr_web80_3'.

User 187934 Photo


Senior Advisor
20,190 posts

Do you have any spaces in the naming of your form or mysql setup?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 402303 Photo


Registered User
5 posts

Hello Eric,

my host had to grant me external access....
Sorry for the confusion.
User 2745417 Photo


Registered User
3 posts

Similar problem: I'm setting up my 4th form on a website (same site & database for all). First 3 are working, but this last one I'm getting:
"Your form could not be submitted for the following reason(s):
Warning: [ err 2/line 74/datasavemysql.cls.php] PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known
Failed to open database [2002] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known."

Checked and double checked the way I entered my database info, and I tried setting up a new database and connecting to that one... any troubleshooting suggestions? Thanks!
User 103173 Photo


VP of Software Development
0 posts

Scott Smith wrote:
Similar problem: I'm setting up my 4th form on a website (same site & database for all). First 3 are working, but this last one I'm getting:
"Your form could not be submitted for the following reason(s):
Warning: [ err 2/line 74/datasavemysql.cls.php] PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known
Failed to open database [2002] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known."

Checked and double checked the way I entered my database info, and I tried setting up a new database and connecting to that one... any troubleshooting suggestions? Thanks!

Contact your hosting provider and have them install PDO module for PHP.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 2745417 Photo


Registered User
3 posts

I will do that, but that said, my other forms that I just uploaded are working fine on the same server...
User 2745417 Photo


Registered User
3 posts

Just went into my 1and1 account and noticed that I had not set my PHP version for this domain. Maybe this is the issue? I selected PHP5. Will let you know if that solved my issue. thanks.
User 514086 Photo


Registered User
10 posts

Hi there,

Not sure if this is the same problem or a new one but when I just have the form submit to mySQL db it works fine. When I add in the payment option to route to paypal, I get this error - SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 - and the I'm not sent to paypal. However, when I check my db, the table has been created and the data is there. I'm sure I'm missing something, but can't find it. New to this payment thing.

Thanks for any help.


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.