installing mysql.docx

Upload: suhaibah-idris

Post on 14-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Installing MYSQL.docx

    1/3

    Installing MYSQL:

    Next we will be installing MySQL version 5. Follow the stepscarefully.

    1. Go towww.mysql.comand download the "Windows (x86)ZIP/Setup.EXE (version 5.0.27)" to your desktop. (To do thisyou'll need to register an account with MySQL.)

    2. Once "mysql-5.0.27-win32.zip" has finished downloading,you can extract it using WinZIP or a similiar program.

    3. Once extracted, double click on the "Setup.exe" file. Aninstallation wizard will appear.

    Click "Next".

    4. Select "Typical" Installation and click "Next".5. Click "Install". (Be patient, this can take up to several

    minutes).

    6. The next screen will ask you to "Sign Up". Select "Skip Sign-Up" for now.

    7. The next screen will tell you that the installation wizard iscomplete. Make sure that the "Configure the MySQL Servernow" field is checked before clicking "Finish".

    8. The MySQL Server Instance Configuration Wizard shouldappear. Click "Next".

    9. Select "Detailed Configuration" and click "Next".10.Select "Developer Machine" and click "Next".11.Select "Multifunctional Database" and click "Next".12.Click "Next".13.Select "Decision Support (DSS)/OLAP" and click "Next".14.Select "Multifunctional Database" and click "Next".15.Make sure "Enable TCP/IP Networking" is checked, the Port

    Number is set to "3306", and "Enable Strict Mode" ischecked. Click "Next".

    16.Select "Standard Character Set" and click "Next".

    http://dev.mysql.com/downloads/mysql/5.0.html#downloadshttp://dev.mysql.com/downloads/mysql/5.0.html#downloadshttp://dev.mysql.com/downloads/mysql/5.0.html#downloadshttp://dev.mysql.com/downloads/mysql/5.0.html#downloads
  • 7/27/2019 Installing MYSQL.docx

    2/3

    17.Check "Install As Windows Service", set the Service Name to"MySQL", and check "Launch the MySQL Serverautomatically". Make sure that the "Include Bin Directory inWindows Path" is NOT checked. Click "Next".

    18.On the next screen, check the box that says "ModifySecurity Settings". Enter a password for the default "root"account, and confirm the password in the box below. DoNOT check the boxes "Enable root access from remotemachines" or "Create An Anonymous Account". Click "Next".

    19.Click "Execute". (This may take a few minutes. Be patient).20.Click "Finish".21.To test if MySQL was installed correct, go to: Start > All

    Programs > MySQL > MySQL Server 5.0 > MySQL CommandLine Client. The MySQL Command Line Client will appear:

    22. It will ask you for a password. Enter the password youcreated in step 18. (If you enter an incorrect passwordMySQL will automatically close the command line)

    23.Next, type in the commands shown below: (shown in blue)

    If you don't get any errors, and it returns the informationshown above, then MySQL has been successfully installed!Next we will need to configure PHP to work with MySQL.

    Configuring PHP to work with MySQL:

    Now that both PHP and MySQL are installed, we have to configurethem to work together.

    1. Open up your php.ini file (C:/WINDOWS/php.ini) and findthe line:

    ;extension=php_mysql.dll

    To enable the MySQL extension, delete the semi-colon at

    the beginning of that line.

    2. Next we must add the PHP directory to the Windows PATH.To do this, click: Start > My Computer > Properties >Advanced > Environment Variables. Under the second list(System Variables), there will be a variable called "Path".Select it and click "Edit". Add ";C:\php" to the very end ofthe string and click "OK".

    3. Restart your computer for the changes to take effect.

  • 7/27/2019 Installing MYSQL.docx

    3/3

    4. Create a new file in your "htdocs" directory called"mysql_test.php".

    5. Copy the following code into "mysql_test.php" and clicksave. (Make sure to replace the MYSQL_PASS constant with

    the MySQL Password you specified during the MySQLinstallation).

    6. Open up Internet Explorer and type in"http://localhost/mysql_test.php". If the "mysql_test.php"page returns something similiar to:

    ID: 1Name: John

    Then PHP & MySQL have been successfully configured towork together. Congratulations! The next and final step isto install phpMyAdmin.