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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

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.