Configuring MySQL on Windows


Somewhat new to MySQL is the MySQL Server Instance configuration wizard, a graphical tool for customizing how MySQL runs. It's available starting with MySQL 5.0 and only on Windows.

The wizard is fairly simple to use, but it's pretty important, so I'll run through it with you. The end result will be the creation of a my.ini file, which the MySQL server and utilities will use for their settings.

To configure MySQL on Windows:

1.

Launch the configuration wizard.

You can access this immediately after installing MySQL for the first time (see Figure 1.5) or at any point in time later through the Start Menu shortcut (under the MySQL folder, added to the Start menu during installation).

2.

Select whether you want to perform a Detailed or Standard configuration (Figure 1.6).

Figure 1.6. Choose a configuration type: Detailed or Standard.


Most users will probably want to go with Standard here (although Detailed is the default). The following steps will go through the Standard configuration.

3.

Set the basic MySQL settings (Figure 1.7).

Figure 1.7. I would advise that you go with these settings, for a more trouble-free operation.


With the Standard configuration, there are just a few choices. You should opt for installing MySQL as a Windows service, and have it launch the server automatically so that it's always running. You should also choose to include MySQL's bin directory in the Windows PATH, which will make it easier to run MySQL applications from the command line.

4.

Define the security settings (Figure 1.8).

Figure 1.8. Definitely create a secure root user password and do not enable remote root access!


The choices you make here are very important. For starters, enter a good root user's password. The root user has unlimited access to MySQL, so this password should be secure and one you won't forget. Besides that, I would recommend that you not enable root access from remote machines or create an anonymous account. Both are security risks.

5.

Click your way through the rest of the configuration process.

Tips

  • When you install MySQL as a service, it can automatically be started when your computer starts. It can also restart automatically after a system crash.

  • Once you've created the root MySQL user, you can create other, day-to-day users, by following the steps outlined in Chapter 2.

  • The MySQL configuration wizard can be used to configure a new installation or to reconfigure an existing MySQL installation. After you've used it once, the next time it runs, you'll be given the option to reconfigure the current instance or remove it entirely. Removing the configuration only stops the MySQL service and deletes the my.ini file; it does not delete the installed files or your databases.


MySQL and Firewalls

If you have a firewall installed and running on your machine, you'll most likely need to tweak it in order for MySQL to run. This is necessary because a firewall, by definition, limits access to your computer. MySQL, by default, uses the port 3306, which may be blocked by the firewall.

If you have problems, which may appear when the configuration wizard attempts to finish doing its thing, try temporarily turning off your firewall to confirm that is the source of the problem. If MySQL works with the firewall disabled, you know the firewall is the issue. The solution then is to adjust the firewall's settings to allow communications through port 3306. How you do this differs from one operating system or firewall program to the next, but a quick search through the applicable firewall help files or Google will turn up useful answers.





MySQL Visual QuickStart Guide Serie  .Covers My SQL 4 and 5
MySQL, Second Edition
ISBN: 0321375734
EAN: 2147483647
Year: 2006
Pages: 162
Authors: Larry Ullman

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