Installing MySQL

Step 1 is to go to http://www.xampp.com and download the install file for the OS you are running, be it Windows XP, Vista, Linux or whatever. The installation is automatic. It includes MySQL and Apache server by default. To test, just open a browser and point to http://localhost

Opening PHP files

You can't just open a php file in Windows from Windows Explorer, you need to start your browser and load the file that way. Windows doesn't know what PHP is, but a browser will work because the of the interchange with the (Apache) HTTP server.
So just open a browser and then open the file under http://localhost/phpfilename.php, where phpfilename is located under htdoc directory under c:/xampp

Running MySQL commands under Windows

You need to open a command line window.
You need to run c:/xampp/mysql/mysql.exe as root by entering:
c:/xampp/mysql/mysql.exe -u root
or you can do the whole cd /xampp/mysql thing to put you in the right directory or change your path.
Command DesriptionsMySQL Commands
to show what databases exist on the servershow databases;
to use a particular dbuse [database];
show tables in a dbshow tables;
to show what fields are in a tabledescribe [tablename];
to show what fields are in a tabledescribe [tablename];
to show what columns are in a tableshow columns from [tablename];
to show every field and record in a tableselect * from [tablename];

Back Home