0

I am trying to connect mysql database from Linux server ,it showing

warning mysqli_construct() connection refused (HY000/2002)

i dont know why ,please suggest me a solution for this issue( Actually i am calling a php program which is used for connecting database in Linux mate terminal it shows like this connection refused).

Thanks

VinothRaja
  • 1,405
  • 10
  • 21

1 Answers1

0

This has been asked before, see: Getting error mysqli::real_connect(): (HY000/2002): No such file or directory when i try to access my project on live server

Is MySQL running on the host you are trying to connect to? And are you sure about that?

If MySQL is running locally (on localhost), you can connect to it from the command line using:

mysql -u <db_user> -p <db_name>

If you get an error running that command, check that MySQL is actually running on your platform.

Kellen Murphy
  • 620
  • 6
  • 13