MySQL db exists, can't connect to it, do I need to add user to it?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I was in the terminal when I made the db, i used the following command to make the db.
mysqladmin create search
I know it exists because I thought it might have not made it the first time and I tried it again, it gave me a message saying the db already exists.
This is the command I used to connect to it.
$con = mysql_connect("localhost")or die("Couldn't connect to MySQL server. Please send the following information to the site admin. <br /><br />: ".mysql_error());
$db = "search";
mysql_select_db($db, $con)or die("Connect Error: ".mysql_error());
I;ve also tried puting the root username and password in the connection variable, no luck.
This is the error
Connect Error: Access denied for user: '@localhost' to database 'search'