Page 1 of 1

Newb question PHP/mySQL

Posted: Sat Jan 11, 2003 8:09 pm
by Tekmosis
I'm runnin PHP/mySQL on my PC as of right now using Apache. The thing that stumps me is on some php code that I've seen/tested it uses

Code: Select all

$server = "localhost";
$db_user = "username";
$db_pass = "password";
$database = "database";
Now how do I know what my username/pass is? I havn't set anything except when I first installed mySQL in which I had done "mySQLadmin -u root password yourpassword" yet no user name. How would I set a user name and would I use the password I set when I did the "mySQL -u root password yourpassword"? Help would be much appreciated

Posted: Sat Jan 11, 2003 8:54 pm
by volka

Posted: Sat Jan 11, 2003 10:32 pm
by oldtimer
You have to add a database and give it a username and password.

Re: Newb question PHP/mySQL

Posted: Mon Jan 13, 2003 3:34 am
by twigletmac
Tekmosis wrote:..."mySQLadmin -u root password yourpassword" yet no user name. How would I set a user name and would I use the password I set when I did the "mySQL -u root password yourpassword"? Help would be much appreciated
You do already have one username - root - that is automatically setup when MySQL is installed and it would appear that you've also set a password for it so if you use those two in combination you should be good to go.

Mac