0

I have two hosts

  • web host ( A server )
  • database server ( B server )

Connection between them is not stable. I don't believe it is connectivity via servers problem, because I can reach that database and website anytime I want from my local device. What could be wrong?

Specification:

  • MySQL 5.5.52 ( B server )
  • CodeIgniter 3.1.0 ( A server )

What was done:

  • Opened port for MySQL in B server;
  • Granted full privileges for user to connect from A server IP to database;
  • Edited my.cnf file - added B Server's external IP (in config value: bind-address)

Error Msg;

A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2003): Can't connect to MySQL server on 'IP' (4)

7
  • what does not stable mean Commented Oct 14, 2016 at 6:13
  • One time it works, one time it says that can't connect to database Commented Oct 14, 2016 at 6:16
  • well show the actual error message you receive from the server Commented Oct 14, 2016 at 6:17
  • A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2003): Can't connect to MySQL server on 'IP' (4) Filename: mysqli/mysqli_driver.php I just simply selecting value, one time it returns result, one time it returns that error. Commented Oct 14, 2016 at 6:24
  • please see 1 , 2 , 3 , Commented Oct 14, 2016 at 6:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.