Home Products Articles Links Internet Marketing & SEO Contact Us

Home » Articles » Databases »

Introduction to MySQL

From Mike Chapple,

SQL Overview

Fed up with the world of commercial software licensing? Are you looking for a stable database platform for your organization but sweating at the hefty price tags attached to mainstream products from Microsoft and Oracle? MySQL may be for you!

Once the refuge of geeky hackers, MySQL is now a well-respected product that is more than capable of commercial operation. In fact, the entire Google search engine is built upon MySQL technology!

What about features? MySQL actually supports most of the functionality you’ve come to expect in a commercial RDBMS. It ensures that transactions comply with the ACID Model, allows the building of indexes, supports standard data types, and allows for database replication, among other features.

One major area where MySQL currently falls short is its lack of support for stored procedures and triggers. However, both of these features are slated for the next major release – MySQL 5.0.

If you’re a heavy user of web applications, you’ll be pleased to learn that MySQL meshes perfectly with the Perl Hypertext Preprocessor (PHP) dynamic web development language. If you’re a Microsoft IIS user, it works quite well with Active Server Pages (ASP), as well. In fact, if your ASP code is ANSI SQL-compliant, you may be able to simply plug and play a MySQL server into your production environment very easily!

Like the popular Linux operating system, MySQL is released as open source software under the GNU Public License (GPL). In most cases, you can download, install and work with MySQL without paying a cent. There are some exceptions for those who create software built upon MySQL for resale. If you think you might fit this exception, take a look at the terms of the MySQL commercial license.

If that’s enough for you to decide that you’d like to give MySQL a try, you can download a copy from MySQL.com. That site is also a great resource for information on the MySQL platform geared toward administrators and developers alike.

One major area where MySQL currently falls short is its lack of support for stored procedures and triggers. However, both of these features are slated for the next major release – MySQL 5.0.

If you’re a heavy user of web applications, you’ll be pleased to learn that MySQL meshes perfectly with the Perl Hypertext Preprocessor (PHP) dynamic web development language. If you’re a Microsoft IIS user, it works quite well with Active Server Pages (ASP), as well. In fact, if your ASP code is ANSI SQL-compliant, you may be able to simply plug and play a MySQL server into your production environment very easily!

Like the popular Linux operating system, MySQL is released as open source software under the GNU Public License (GPL). In most cases, you can download, install and work with MySQL without paying a cent. There are some exceptions for those who create software built upon MySQL for resale. If you think you might fit this exception, take a look at the terms of the MySQL commercial license.

If that’s enough for you to decide that you’d like to give MySQL a try, you can download a copy from MySQL.com. That site is also a great resource for information on the MySQL platform geared toward administrators and developers alike.

You'll probably find that there have been several minor releases that follow the release of 4.1. These will be indicated by adding a third number to the filename. For example, as of October 31, 2004, the current release is 4.1.7. In general, you should select the highest numbered release that doesn't have the word "alpha" "beta" or "gamma" after it. Those keywords indicate pre-release versions of MySQL that are currently being tested by the open source community.

Then it's time to download the correct file! You can obtain a complete listing of available MySQL downloads from the MySQL site. Select the file that corresponds to the version you wish to install and your operating system. Note that unless you have a specific reason to do otherwise, you should select the "standard" version. If you're attempting to install MySQL on a non-supported operating system, you'll need to download the source files instead. Note that this is not a process suggested for beginners. In fact, if you aren't familiar with the word "compile," steer clear of this process.

Configuring MySQL for Windows
Now that you’ve installed MySQL, it’s time to perform some basic administrative and configuration tasks to ensure that your database environment is ready for production. In this installment of our MySQL series, we’ll look at the process of configuring MySQL on a Windows system. Next time, we’ll explore getting up and running in a Linux/Unix environment.

If you installed MySQL on a Windows system and used the Windows Installation Wizard, you’re probably already good to go! When that wizard completed, it most likely launched the MySQL Configuration Wizard which walked you through the process of configuring the database. If you didn’t go through the configuration wizard or wish to repeat the process, you may manually invoke it by navigating to the bin directory of your MySQL installation and issuing the command MySQLInstanceConfig.exe.

When the wizard starts for the first time, it asks you if you’d like to perform a standard configuration or a detailed configuration.

Unless you have a specific reason to do otherwise, you should start by selecting the less complex standard configuration process. If your system will be running more than one instance of MySQL or you have unusually complex requirements, you should consult the MySQL Documentation and use the detailed configuration process.

The standard configuration process consists of two steps: service options and security options. You’ll first see a screen asking you if you’d like to install MySQL as a service. In most cases, you should select this option. Running the database as a service lets it run in the background without requiring user interaction. You also probably want to select the option to launch the MySQL server automatically at startup. The combination of these two options allows MySQL to restart automatically upon process or system failure.

The second phase of the standard configuration process allows you to set two types of security settings. The first is the use of a root password, which is strongly recommended. This root password controls access to the most sensitive administration tasks on your server. If you’re running in an environment where the administrator can access the system running MySQL, you might also want to check the box that specifies the root account may only connect from the www.GlobalComputerBusiness.com. This prevents administrative connections from remote network location. The second option you’ll select on this screen is whether you’d like to have an anonymous user account. I recommend that you do not enable this option unless absolutely necessary to increase the security of your system.

Configuring MySQL for Linux
On the previous page of this article, we took a look at the process used to configure MySQL on a Windows system. If you're using a Linux system (like the majority of MySQL users), the process is a bit different. Let's take a look.

You have three main tasks to complete the basic configuration of your Linux MySQL server:

Create the grant tables
Start the server
Verify server function

You first create MySQL's grant tables and fill them with the default data used to determine access privileges for the database server. This is accomplished using the mysql_install_db program. First, you need to locate this file. On most installations, you'll find it in either the /bin or /scripts directory under the MySQL root. Once you locate it, run it using the --user=mysql flag.

Introduction to MySQL

Home » Articles » Databases » MySQL »

related web pages on net

Copyright © 2005 Genuine Infotech Private Limited - Software Development and Software Outsourcing Company in India
Feel free to Contact us  for your Outsourcing Software development Job Work from India