PHP mysql_connect to remote server

I am moving an application to a different set of servers with an upgraded stack.  I'm going from one Ubuntu server with standard MySql to a pair of CentOS servers.  The DB server runs MariaDB.

I can now make the remote connection using mysql -h 10.1.1.1 -u my_user -p my_database, indicating that the firewall is not the problem and neither are the permissions.

However, mysql_connect fails.  I've temporarily hard-coded the parameters so I'm sure I'm attempting the right connection.

What other errors should I look for?

Thanks!
LVL 32
Daniel WilsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
Please post the actual error message you're seeing.  Also, the versions of PHP on the old and the new servers.
0
Ray PaseurCommented:
It could be that MySQL (deprecated for a few years now) is throwing the errors.  This article will show you how to do the upgrade.  It will also show you how to get the error messages so we can figure out what might be wrong.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_11177-PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Daniel WilsonAuthor Commented:
Can't connect to MySQL server on '10.x.y.z' (13)

Open in new window


Oops, yeah, I've upgraded to php 5.6.6.

So ... the upgrade to the newer library is forced.

Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.