Sunday, February 17, 2008

Installing MySQL

After setting up the computer and installing the Web server, you’re ready to install MySQL. You need to install MySQL before installing PHP because you may need to provide the path to the MySQL software when you install PHP.

But before installing MySQL, be sure that you actually need to install it. It might already be running on your computer, or it might be installed but not running. For instance, many Linux distributions automatically install MySQL.
Here’s how to check whether MySQL is currently running:
  • Linux/Unix/Mac: At the command line, type the following: ps –ax ,The output should be a list of programs. Some operating systems (usually flavors of Unix) have different options for the ps command. If the preceding does not produce a list of programs that are running, type man ps to see which options you need to use. In the list of programs that appears, look for one called mysqld.
  • Windows: If MySQL is running, it will be running as a service. To check this, choose StartControl PanelAdministrative ToolsServices and scroll down the alphabetical list of services. If MySQL is installed as a service, it will appear in the list. If it’s currently running, its status displays Started.
Even if MySQL isn’t currently running, it might be installed but just not started.
Here’s how to check to see whether MySQL is installed on your computer:
  • Linux/Unix/Mac: Type the following: find / -name “mysql*” If a directory named mysql is found, MySQL has been installed.
  • Windows: If you did not find MySQL in the list of current services, look for a MySQL directory or files. You can search at StartSearch. The default installation directory is C:\Program Files\MySQL\MySQL Server version number for recent versions or C:\mysql for older versions. If you found MySQL in the service list, as described, but it is not started, you can start it by highlighting MySQL in the service list and clicking Start the Service in the left panel.
If you find MySQL on your computer but did not find it in the list of running programs (Linux/Unix/Mac) or the list of current services (Windows), here’s how to start it:
  • Linux/Unix/Mac:
    • Change to the directory mysql/bin. This is the directory that you should have found when you were checking whether MySQL was installed.
    • Type safe_mysqld & When this command finishes, the prompt is displayed.
    • Check that the MySQL server started by typing ps -ax. In the list of programs that appears, look for one called mysqld.
  • Windows:
    • Open a Command Prompt window. In Windows XP, choose Start>All ProgramsAccessories Command Prompt.
    • Change to the folder where MySQL is installed. For example, type cd C:\Program Files\MySQL\MySQL Server 5.0. Your cursor is now located in the MySQL folder.
    • Change to the bin subfolder by typing cd bin. Your cursor is now located in the bin subfolder.
    • Start the MySQL Server by typing mysqld—install.
The MySQL server starts as a Windows service. You can check the installation by going to the service list, as described previously, and making sure that MySQL now appears in the service list and its status is Started.

If MySQL isn’t installed on your computer, you need to download it and install it from www.mysql.com. The Web site provides all the information and software that you need.

No comments:

 
breast-cancer diabetes-informa... weight-losse lung-mesotheliom... eating-disorders medical-billing php-and-mysql skin-cancer medical-health astronomy-guide cancer-diseases health insurance seo-news-2008 forex3003 lawyer-lookingforalawyer earnmoneyonline-earn forexautotrading-forex forex-trade forextrading forex-trading-forex-trading-08 searchingforcancertreatment adsense jiankang8008 beauty-girl forex5005