1

I have error regarding of getting database details of a different server. I want to get the database details from the other server. I have tried this code but it shows this error.

Please check the below error :

mysqli_connect(): (HY000/2003): Can't connect to MySQL server on '192.81.134.56' (111)

Any way to solve this error it may be very helpful for me.

Amit Verma
  • 38,175
  • 19
  • 80
  • 104
Sri
  • 633
  • 2
  • 7
  • 20
  • 2
    Speak to the DBA who owns the other database. Your IP address might not have been GRANTed permission to connect. – duffymo Dec 30 '15 at 13:46
  • What do you mean with "different server"? And how are you trying to access it? – Nahuel Ianni Dec 30 '15 at 13:47
  • Can you paste your connection code? – Gal Silberman Dec 30 '15 at 13:50
  • This is my connection code $db_host = '192.81.134.56' $db_user = '372-mysql'; $db_pass = 'ZdKjVUcv'; $db_database = 'demo_advert_live'; $db_port = '61'; $link = mysqli_connect($db_host,$db_user,$db_pass,$db_database,$db_port); – Sri Dec 30 '15 at 14:05
  • @Nahuel lanni I have one wp site in one server and magento site in another server I need to get the db details of the magento site in the wp site server that only I need – Sri Dec 30 '15 at 14:07
  • http://stackoverflow.com/questions/22750724/mysqli-connect-hy000-2003-cant-connect-to-mysql-server-on-domain-name follow this method – Rahul Prajapati Dec 30 '15 at 14:23

0 Answers0