Pieter Lategan Posted June 26, 2011 Share Posted June 26, 2011 Hi I have the following error message Warning: mysql_connect () [function.mysql-connect]: Access denied for user 'bp5am' @ 'localhost' (using password: YES) My username and password are as follows; $ connect = mysql_connect ("localhost", "bp5am", "bp5ampass") or die ("Hey, check your server connection."); Quote Link to comment Share on other sites More sharing options...
perky416 Posted June 26, 2011 Share Posted June 26, 2011 Hi mate, Im not sure if this will solve your problem but you have a space between the $ and connect that would cause an error. Try using $connect instead of $ connect. Quote Link to comment Share on other sites More sharing options...
Pieter Lategan Posted June 26, 2011 Author Share Posted June 26, 2011 no that is not true , I dont have any spaces. I think it have to do with my set up of my username and password, I am not sure how to do that maybe you can look at this: $connect = mysql_connect ("localhost", "bp5am", "bp5ampass") or die ("Hey check your server connection."); or maybe my server connection which I dont know how to do that. Quote Link to comment Share on other sites More sharing options...
perky416 Posted June 26, 2011 Share Posted June 26, 2011 Have you set up the database on your server? Are you using cpanel? Quote Link to comment Share on other sites More sharing options...
Pieter Lategan Posted June 26, 2011 Author Share Posted June 26, 2011 I dont know How to set up the database on my computer, I do it localy on my pc. Quote Link to comment Share on other sites More sharing options...
mikesta707 Posted June 26, 2011 Share Posted June 26, 2011 if you dont have a database setup then of course your mysql_connect is going to fail. I don't know what you are using to host php on your local computer, but you should try to google a tutorial on how to set up a database. Quote Link to comment Share on other sites More sharing options...
Pieter Lategan Posted June 26, 2011 Author Share Posted June 26, 2011 I use XAMPP if that will help. Quote Link to comment Share on other sites More sharing options...
Pieter Lategan Posted June 27, 2011 Author Share Posted June 27, 2011 Hi The problem is solved, I will create privileges in phpMyAdmin, when I did when the databases worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.