Bear with me plese because I am a true beginner.
I'm trying to write a script to create a connection to a mysql database.
To create the connection to the server I use:
$dbcnx = mysql_connect('localhost', 'root', 'mypassword');
My question stems from the fact that when I downloaded mysql and when I installed it, I was never prompted for a username but only for a password. In the reference material I have looked at, I come across something called a "mysqladmin" program that allowed you to create a username when installing mysql. Does the automatic installer that comes with the windows version of mysql not have this. If not, then what is my username.
From what I have also found, i beleive that my username is merely "root" but I don't know if this is the case because when I try to connect using this as my username, I still do not get a connection.
Can someone shed some light on this for me? Did I not install something? Both mysql and php seem to work fine on their own but this connection problem is driving me crazy.
Thanks in advance.