Forum Moderators: coopster

Message Too Old, No Replies

msql access denied

         

dearot

3:44 am on Aug 18, 2005 (gmt 0)

10+ Year Member



I just install mysql,php and phpmyadmin on the server 2003. I tried to connect thorugh [localhost...] but I got #1045 access denied and I tried to connect to mysql using -u username but I also got the access denied message. my php is working coz I run test.php it shows me all the the info.
I have done this before on windows xp and eveythings wa perfectly fine. is there something i should do because I am running under server 2003? I am scratching my head...please help!

bibby

6:26 am on Aug 18, 2005 (gmt 0)

10+ Year Member



you need a database connection script (DBC) in each of the pages that you plan will use the DB:

looks something like this:

//Setting the constants
define ('DB_USER', 'user');
define ('DB_PASSWORD', 'pass');
define ('DB_HOST', 'localhost');
define ('DB_NAME', 'myDB');

$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
mysql_select_db (DB_NAME);

Plus, you'll need to set permissions for 'user' with the GRANT command. Search your PC for plain old mysql.exe and run that (that's where I get all my work done). Forget phpmyadmin!

orion_rus

8:36 am on Aug 18, 2005 (gmt 0)

10+ Year Member



i think you should search in an admin panel (Control Panel -> Administrative Tools) for running mysql service, if you didn't find it (it's seems like so) you need to start it
Good luck to you

dearot

12:26 am on Aug 22, 2005 (gmt 0)

10+ Year Member



The service is running and There is no password set to access myslw at this stage. any clue?

orion_rus

9:39 am on Aug 22, 2005 (gmt 0)

10+ Year Member



try to install phpmyadmin if it wouldn't work, reinstall mysql