PDA

View Full Version : Basic XAMPP problem :l



[Oli]
26-11-2007, 07:09 PM
Okay this is so annoying...

this is my config file:



$connect = mysql_connect("localhost","olivier","pw");
$db = mysql_select_db("2ndpanel", $connect)or die(mysql_error());


I also tried this before:



$connect = mysql_connect("localhost","root","");
$db = mysql_select_db("2ndpanel", $connect)or die(mysql_error());


And I keep recieving this error even though I think all info is correct:



Access denied for user 'ODBC'@'localhost' (using password: NO) in ...


Can someone help please ? <3+rep

Florx
26-11-2007, 07:20 PM
$server = "localhost";
$username = "USERNAME";
$password = "PASS";
$database = "DATABASE";
$mysql = mysql_connect($server, $username, $password);
$mysql = mysql_select_db($database);

[Oli]
26-11-2007, 07:22 PM
$server = "localhost";
$username = "USERNAME";
$password = "PASS";
$database = "DATABASE";
$mysql = mysql_connect($server, $username, $password);
$mysql = mysql_select_db($database);


Tried that out & it's giving me the same error.
Sorry, (+rep for trying to help out)

Edit: must spread.

Florx
26-11-2007, 07:29 PM
Try logging in as the root user to the mysql database :)

[Oli]
26-11-2007, 07:30 PM
Try logging in as the root user to the mysql database :)

Tried, no succes :'(

I think something's wrong with xampp becouse the code to connect is fine ;l

tgb-hosting
26-11-2007, 07:32 PM
$con = mysql_connect("127.0.0.1","root","");
mysql_select_db("databasename", $con);
Thats what i use on my Xampp i uise it alot for coding my PHP orders =]

hope i helped ;]

Florx
26-11-2007, 07:33 PM
You could just install WAMP

tgb-hosting
26-11-2007, 07:34 PM
I recommend Xampp lolz Wamp Lmao,

I've used Xampp all the time never had to change it and i think you'll find my code works cos if your root never put a password ;]

lolwut
26-11-2007, 07:35 PM
I had this problem.
You know on the WinMySQLAdmin thing that comes with XAMPP? Have a look to make sure the my.ini is correctly set. You may actually need to have the password blank as it was the only way it worked for me.
Argh, if you want I'll PM you my MSN and remote assist it for you if you want?

tgb-hosting
26-11-2007, 07:39 PM
if your running Xampp and have Apache and MySQL going go to http://127.0.0.1/phpmyadmin [http://localhost/phpmyadmin] and you can set user settings like paswords etc

[Oli]
26-11-2007, 07:42 PM
I had this problem.
You know on the WinMySQLAdmin thing that comes with XAMPP? Have a look to make sure the my.ini is correctly set. You may actually need to have the password blank as it was the only way it worked for me.
Argh, if you want I'll PM you my MSN and remote assist it for you if you want?

Apperently that is not included in my download :o
Ill look it up on google

[Oli]
26-11-2007, 08:03 PM
NOTE: Can not edit last post!
_____________________________


None of this is working. :'(.
I have this winMySQLadmin.exe open & it sais:

user=olivier
password=pw

at the myini Setup

If I use that info it still isn't working. (same error)

Want to hide these adverts? Register an account for free!