As mentioned before in this thread don't use the
WinMySQLAdmin program as it is deprecated and, in XAMPP, is of little use.
Use
http://localhost/phpmyadmin/ instead for just about all things MySQL database related - that is until you get familiar with the Command line, if that is what you intend, but the GUI of phpMyAdmin is quite superb and there is not much that you can't do with it that can be done using the command line.
http://localhost will get you to the
XAMPP Welcome Page and in the left column there are several demo databases already constructed for you to test that MySQL is functioning.
When you open phpMyAdmin, after entering
root with a password if you set one or without if you haven't set one yet, you will see those demo databases ie.
CD Collection (cdcol) in the left column and after clicking on one you will be able to see how they are constructed etc.
In
htdocs\xampp you will see the associated php files ie.
cds.php for the
CD Collection.
In the
mysql\data\cdcol\ folder there will be the associated database files - but not directly readable as they are binary files, but just as a reference to where things go.
My advise is to have a click around in phpMyAdmin and setup your own database with a user and password for that user to access the database and see how it all comes together.
The
root user should never be associated with a database, as
root is the super user and should only access at localhost level to administer all things - and should have a password set for obvious security reasons.
Always create a database with a user and a password so that user can only access that particular database (or several related databases of your choosing).
If you want that user to access from outside the localhost loop back address then in
phpMyAdmin under
Privileges select that user and click on the
Edit button at the end of the user line.
Now drill down till you see a box labeled
Change Login Information / Copy User
Now look for
Host and from the drop box select
Any Host which will put this
% in the text box next to it.
Leave everything else as is for that user (unless you wish to change anything) then select
Go from within this same box.
Your user should now be able to access the designated database from a remote location...
...and in your script you should be able to use a
hostname of your choosing as MySQL will now accept connections on that
database name and that
database user with
user password from Any Host.
If you want the
root user to access from outside localhost then it is paramount you set a very good password and then follow the above procedure - remember that
root user in the wrong hands can destroy all your databases and the data within and can even manipulate the data for their own evil ends, so be very careful with what you do with the root user.