Jump to content

MAMP Installation local to Server and SQL Errors


Recommended Posts

I feel like giving up, I have created my site locally for speed and testing purposes, everything is working, so I have uploaded it all to my server, but now I get an error messge:

Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

 

I tried creting a php file with the following lines:

$mysqli = new mysqli("localhost", "my_user", "my_password", "my_database");

 

as someone suggested to another user for a similar problem and trying to access that via the browser, and the browser returns the same line of text. I'm afraid I don't know sql at all so I don't know if that is what its supposed to do or not, eitherway I'm stuck, can anyone help me please?

 

Thanks in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...