spacer
Web Development Tutorials MYSQL Tutorials
 Developer Newsletter

Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous


Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Developer Manuals
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
Free White Papers

Developer Resources
Developer Tools
Developer Content
Survey Software
Dedicated Servers




Installing MySQL on Windows

By Michael J. Ross
2008-02-28


Configuring MySQL

At the initial Server Instance Configuration Wizard dialog box, click the "Next" button.

The configuration wizard allows you to choose either a detailed configuration, which gives you more control, or a standard configuration. Most developers, and this tutorial, will use the former option, which is also the default. Click the "Next" button.

At this point, you must indicate how MySQL is going to be used on your PC — simply for development purposes, or as one of several server applications, or as an exclusively MySQL database server. For our purposes, choose the first option, which is the default. Click the "Next" button.

MySQL has two different built-in database storage engines: InnoDB and MyISAM. Only the former offers transaction functionality, but does so at a cost of somewhat reduced performance. At this point in the installation process, you should decide whether you will need — or simply want to try out — transactional operations for any of the database applications that you will be using with this particular MySQL instance. If you are sure that you will not be needing transactions, then you can choose the third option, "Non-Transactional Database Only", which is what we will be using in this tutorial. Otherwise, if your applications will be making heavy use of transactions, then choose the second option, "Transactional Database Only". This choice does not, however, preclude you from using the MyISAM engine. If you are not sure as to your need for transactions, or you see them as a limited portion of all anticipated transactions, then choose the first option, "Multifunctional Database", which is the default. Note that use of the InnoDB engine does require a considerable amount of disk space for the tablespace.

If your database is going to be hit by a large number of applications running concurrently, then it will need to allow a proportionally larger number of active connections. In that case, choose the second option in the dialog box shown above, "Online Transaction Processing (OLTP)". But this probably will not be the case for your development PC, and so you can leave the default option, "Decision Support (DSS)/OLAP", and then click the "Next" button.

For MySQL's networking, it is recommended to go with the defaults, namely, to enable TCP/IP networking, using port number 3306. The option to enable strict mode is not adequately explained in the dialog box. You should make a choice based upon whether or not there is a chance you will be using your database with applications, such as a proprietary shopping cart, whose code you cannot modify — specifically, any SQL queries. If that is the case, then do not enable strict mode, because it could result in an error if and when the application tries to set a non-nullable column to a default value by specifying an empty value of a different type, and you get an error 1366. Click the "Next" button.

Choose the standard character set, which is the default option.

MySQL can be run by Windows as a service, and started automatically when you boot up your PC. Those are the default and recommended settings. MySQL's binary directory — in our case, "C:\_a\MySQL\bin" — contains more than a dozen executable programs. The Configuration Wizard can add the directory to your Path environment variable, so the programs can be run at the command line without specifying the directory. Click the checkbox to enable that, and then click the "Next" button.

At the security options dialog box, enter a new root password, twice. Do not check the option to "Enable root access for remote machines", for security reasons. Do not bother creating an anonymous account, since you should do everything with named accounts. When you are satisfied with your chosen root password, record it somewhere safe, and then click the "Next" button.

The Configuration Wizard is now ready to execute all of the settings that you have made in the earlier dialog boxes. Click the "Execute" button.

If you tried to install MySQL in a directory that still contained the "data" subdirectory, then the security settings will fail, and you will get an Error 1045.

But if the configuration does not encounter any errors, then you will be informed that the configuration file was created, the MySQL service was installed and started, and your security settings have been applied.



Tutorial Pages:
» Introduction
» MySQL Already Installed?
» Downloading MySQL
» Installing MySQL
» Configuring MySQL
» Verifying MySQL
» More Resources


Related Tutorials:
» Implementing High Availability in MySQL
» Stored Procedures are EVIL
» MySQL Database Handling in PHP
» A Flexible Method of Storing Control Data
» Exploring MySQL CURDATE and NOW. The Same But Different.
» Creating a PostgreSQL and MySQL driver



About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: