Hello, and thanks in advance for any help..
this is driving me up the wall, crazy, insane. i recently reformated my computer and reinstalled everything. i also took this chance to update some of my apps. i was running apache 1.3 and php 4.0 with mysql 3.2 before. now im running apache 2 with php 4.3 with mysql 3.2.
my problem is with mysql access. as i have always done before, i installed apache, checked that it worked, then installed php and checked that it works. then i install mysql and check that it works. when i install mysql (i use the installer) i get it to run by double clicking on the mysqladmin tool under the bin folder. as it always has, it asks me for a username and password to use. i inserted those, and a my.ini file was created. problem is i can't find this new username and password under the user's table. Where did it go? did it not insert?
add to that, my scripts don't work anymore. before i would connect to the mysql database like this:
//Connection information
$dbhost = "localhost";
$dbuser = "administrator";
$dbpass = "xxxx";
$dbname = "f1bahrain";
// Connect to MySql
$connect = mysql_connect($dbhost, $dbuser, $dbpass)
or die("Unable to connect to MySql");
// Connect to Database
$db = mysql_select_db($dbname, $connect)
or die("Unable to connect to Database");
but that doesn't work anymore. it gives me this error message:
Warning: mysql_connect(): Access denied for user: 'administrator@localhost' (Using password: YES) in F:\f1bahrain\index2.php on line 290
Unable to connect to MySql
if i remove the password entirely from the script like this:
$dbpass = "";
it gives me the following error message:
Unable to connect to Database
the database is there.. i connect to it using phpmyadmin just fine. so why doesn't the script work? i don't understand whats going on...
speaking of which. phpmyadmin uses the root username to connect to mysql, which gives me an error message about the $cfg directive. i fixed that by giving it a url and password.. but the password doesn't work.. i get the same error message as above.
please someone help me out... this is giving me a headache..
thanks
Mike