Installing MySQL 3.23.49
After you have downloaded this file unzip it to a temporary directory. For exampe: C:\MySQLTemp
Go to that folder and click the Setup Application file (shown as a computer icon).
The Setup should begin. Click through the first couple of screens and select the default location to install MySQL to (C:\MySQL).
Next: Open up the file C:\mysql\bin\winmysqladmin.exe (The icon has a little my SQL graphic). This will prompt you for a UserName and password you want to use for accessing MySQL. Enter a Username and password of your choice and then click ok. This creates a file called my.ini (Located: C:\Windows\my.ini) You can open this up if you want, you should see the Username and Password you just specified as the 3rd and 4th line in this file. Their are some other items you can change here, but for are purpose's that's all that's needed.
Create a PHP script called 'TestSQL.php'. Then add the following to that file.
mysql_connect("localhost","yourUserName","yourPassword") or die("Uh Oh, Could not
$Version = mysql_get_server_info();
$HostInfo = mysql_get_host_info();
print "My current MySQL version is: $Version
Make sure to replace "yourUserName" and "yourPassword" with the ones you choose above. Then place this file into your htdocs folder and open up: http://localhost/TestSQL.php - This should result in 2 lines being printed to the screen - saying something like "My current MySQL version is: 3.23.49 On localhost via TCP/IP". If that was successful then MySQL is up and running. You should also see a Stop Light Icon on your task bar - The light will be Green if mySQL is running. You can use that to display some system info (select show me) if wanted.
That's about it for MySQL. The next section will go into detail on one Web based tool that easily allows you to create new database, tables, and the over all structure of your database along with some simple examples. For those of you that are more comfortable with the command line MySQL can also be used by opening up a DOS prompt to the C:\mysql\bin directory and typing in MySQL - then you can go on to do whatever you want with MySQL. This is virtually the same as using Telnet to access MySQL on a Unix server. However since many of us are not really comfortable with the Command line option - we'll be using a Tool called PHPMyAdmin that avoids this and makes MySQL really really easy to use!
For information on using the command line from the DOS prompt or from Telnet read the first part of this.
For further information on MySQL and a great reference manual visit - http://www.mysql.com/doc/.
|» Level Advanced|
Rating: 9 Votes: 108
|Jeffrey Hill is a freelance web developer from Boulder, Colorado. He specializes in creating and developing dynamic database driven Flash content, applications, and content management systems. Specialty's include SQL, PHP, Perl, XML, web services, and Flash clients for web services.|
|Download the files used in this tutorial.|
|Download (30 kb)|
|More help? Search our boards for quick answers!|