Click to See Complete Forum and Search --> : What is this error, how can i solve it?
solidariti
12-02-2005, 09:16 AM
Hi All,
I have been trying to connect to a local database, setup using xampp, however I keep getting this error. I have checked the passwords, and they are the same, but it still wont let me connect, what does this error actually mean?
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in H:\xampp\htdocs\www\football-stats\login\functions.php on line 227
Access denied for user 'ODBC'@'localhost' (using password: NO)
NogDog
12-02-2005, 09:45 AM
We'll probably need to see the source code for H:\xampp\htdocs\www\football-stats\login\functions.php in order to figure this out.
solidariti
12-02-2005, 10:01 AM
from functions.php:
$conn = mysql_connect($server,$username,$password) or die ($couldNotConnectMysql.mysql_error());
if ($installer!="nodbsel"){
mysql_select_db($database,$conn) or die ($couldNotOpenDatabase.mysql_error());
}
which uses this file called config.php
$server = ""; // often localhost
$username = "root"; // Your MySQL server username
$password = ""; // Your MySQL server password
$database = "football-stats"; // If you fill in nothing database 'members' will be used. If 'members' doesn't exist it will be created.
$DBprefix = "security"; // the prefix for the tables in the database (can be left blank)
solidariti
12-02-2005, 10:10 AM
How ould I create a form, that will let someone enter their database details, etc, so the system can install, for instance, like mambo does.
NogDog
12-02-2005, 10:10 AM
Looks like you need to fill in values for $server and $password in config.php. Also, if the web page is intended to be accessible to the public, you should probably create another database user (other than "root") with the minimum access and permissions to do what is needed here, rather than potentially having the "root" database user potentially be accessible to any hackers (and update the $username value accordingly in the same config file).
solidariti
12-02-2005, 10:28 AM
I'm using a locahost so it doesnt really matter, as I'm just doing this for testing, even with the localhost and password in it keeps coming up with that error. :-(