Installing MySQL on Windows

I l @ ve RuBoard

Installing MySQL is a uniform process across all versions of Windows. The only difference is that, under later releases (Windows NT, Windows 2000, and Windows XP), it can be installed as a service so that it's always available.

Getting the Binary Distribution

Point your browser to http://www.mysql.com/downloads/mysql-3.23.html. Click the Windows download link.

Next you'll choose a site from which to download; try to pick one at least in the same country as your computer (although I suppose you could try downloading it from Chile, if that kind of thing appeals to you).

Save the ZIP file to somewhere you can find it; the My Documents folder or the desktop generally work best.

Unpacking the MySQL Distribution

When the file is finished downloading, open it from the directory where it was saved and extract the zip file to a temporary directory, such as C:\TEMP\MYSQL.

Running the MySQL Installer

If you unpacked to C:\TEMP\MYSQL, you'll find a file called SETUP.EXE in that directory. Run it. Accept the default options for all the installation questions, including installing it into C:\MYSQL, and let it install.

Completing the First-Time MySQL Setup

Click Start and type in the following:

 C:\mysql\bin\winmysqladmin.exe 

The MySQL admin window comes up briefly and then disappears. On the taskbar, you'll see a stoplight with a little green light on it, indicating that MySQL is running.

Differences Between MySQL Under Windows 95 and 98 and Windows 2000, XP, and NT

Under the Windows 2000, XP, and NT operating systems, MySQL is installed as a service, which means that you do not need to explicitly start it after you boot. Under Windows 95 and 98, you need to run winmysqladmin to start MySQL after each reboot.

Adding MySQL Binaries to the Path

Follow the directions in Appendix A,"Getting and Installing JDK, Ant, and Tomcat," for adding JDK to the path. Choose the appropriate operating system and add ;C:\MYSQL\BIN to the end of the PATH variable.

Creating a Test Database

Open a command prompt window and type the following ( user commands are in bold):

 C:\Documents and Settings\james>  mysqladmin create TestDB  C:\Documents and Settings\james>  mysql TestDB  Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 5 to server version: 3.23.45-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>  create table TestTable (  ->  String1  CHAR(40),  ->  String2  CHAR(40));  Query OK, 0 rows affected (0.04 sec) mysql>  insert into TestTable values ('Foo', 'Bar');  Query OK, 1 row affected (0.00 sec) mysql>  select * from TestTable;  +---------+---------+  String1  String2  +---------+---------+  Foo      Bar      +---------+---------+ 1 row in set (0.00 sec) mysql>  quit  Bye C:\Documents and Settings\james> 
I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net