Report this

What is the reason for this report?

500 error using mysql_connect

Posted on February 6, 2013

Hi,

in every php file were I use command line mysql_connect(“localhost”,“root”,“password”);

I get 500 error, how can I fix this Problem

thanks ;)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

That most likely means that either your MySQL server isn’t running your login credentials are incorrect. A 500 server error is displayed by the web server whenever a script fails to execute and the full details are located in the web server error log so if you check that you’ll see if its a user login issue or something else and we can troubleshoot from there.

well I’m novice, i try this “sudo service mysql start” I get the answer from server “Job is already running: mysql”

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.