Connect Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 10 September 2012

Install MySQL on a Windows Server

Posted on 22:55 by Unknown
The following article explains how to install MySQL on a Windows Server. The process involves downloading the latest version of MySQL directly to your Windows server and then installing the software. MySQL is a free product. Once installed, you may begin creating and using MySQL databases on your server.

To install MySQL, please follow these steps:

  1. Log into your server through Terminal Services or Remote Desktop Connection.
  2. Open a Web browser and load http://dev.mysql.com/downloads/
  3. Download Windows (x86) ZIP/Setup.exe (there's no need to sign up.  It is a free download).
  4. Unzip the file you downloaded above and run Setup.exe.
     5.Click Next to begin the installation wizard.






















   6.Accept the License Agreement and click Next.























   7.Select Typical Installation and click Next. 






















    8.Click Install. The installation will take a few moments.






















    9.Click Next until you reach the Wizard Completed screen.

    10.Check Configure the MySQL Server now and click Finish.






















    11.Click Next to begin the MySQL Server Instance Configuration Wizard.






















   12. Select Detailed Configuration and click Next. 















    13.Select Multifunctional Database and click Next. 



















   14.For InnoDB Tablespace Settings, leave the default settings and click Next.




















   15.Select Online Transaction Processing (OLTP) and click Next.




















16.Check Enable TCP/IP Networking, leave the default Port Number and click Next.














  17. Select Standard Character Set and click Next.




















18.Check Install as Windows Service, uncheck Include BIN directory in Windows PATH and click Next.


















 
19.Enter a password for your root user, uncheck Create an Anonymous Account and click Next.


















20.Click Execute to complete the installation.

Modifying Your PHP Configuration to Allow Your PHP Scripts to Use MySQL

Now that you have a MySQL server running on your machine, you will probably want to set up PHP so that your scripts can access databases on the server.
As mentioned earlier, I will assume that you have already set up PHP.
  1. Open up your php.ini file in Notepad. If you have followed the steps in my guide, you should already be familiar with how to do this. The file itself can be found in c:\php\php.ini (unless you have installed it elsewhere). 
  2. Look for the following line.
    extension_dir = "./"
    Modify it so that it now looks like this:
    extension_dir = "c:\php\ext"
    If you used my guide to set up PHP before, "c:\php\ext" is where the extensions were installed. Those who installed PHP in a different folder should of course put the correct path in the extension_dir setting. 
  3. Now search for the following line:
    ;extension=php_mysql.dll
    (Be careful. It's surrounded by a number of lines that look very similar. Be sure you get the line that has "php_mysql.dll" and not "php_msql.dll", "php_mssql.dll" or "php_mysqli.dll".)
    Remove the initial semi-colon (";") so that the line now looks like this:
    extension=php_mysql.dll
    (A semi-colon indicates the start of a comment, which is ignored by the PHP interpreter. Removing it makes the line a configuration setting.) 
  4. Save the file and close Notepad. 
  5. Now start up Windows Explorer. That is, click the Start menu, followed by "Computer". A window should open. Look for "System properties" somewhere near the top of the window. Click it. Then click "Advanced system settings" in the left column. The Vista User Account Control should appear. Click "Continue".

    In the "System Properties" dialog box that appears, click the "Environment Variables" button. In the list box under "System variables", look for the line that has "Path" in the first column. Click it to select it. Click the "Edit" button. 

    A dialog box entitled "Edit System Variable" appears. Click somewhere in the "Variable value" line and use your arrow key to move to the end of the line (or just use the "End" key on your keyboard). Append the following: 

    ;c:\php
    (Note: the above starts with a semi-colon and is followed by the directory/folder where you installed PHP.) 

    This adds "c:\php" to the "PATH" environment variable, which is basically a list of directories that Windows searches for when it needs to look for a program or components of a program. You need to do this because PHP needs it to load a file called libmysql.dll, located in that directory. For some reason, it doesn't seem to be able to do it if "c:\php" is not in the PATH (even though it's the same directory as the PHP program itself). 

    Once you have done this, restart your computer. 
  6. After you reboot your computer, a simple PHP script like the following should be run to make sure that the PHP is able to load the MySQL libraries (DLLs). 

    <?php phpinfo(); ?> 
     
    Save the script as "test.php" in your "htdocs" directory and invoke it from your browser with "http://localhost/test.php". You should now be able to see a new section called "mysql" in the report. This means that PHP was successful in loading its MySQL-related libraries (the extension and libmysql.dll libraries). 
 
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to schedule a PHP script in task scheduler
    Quiet often there is a need to execute/run  php  script on some time interval at server side. And that php scripts should run automatically ...
  • HTTP Error 403.19 – Forbidden The configured user for this application pool does not have sufficient privileges to run CGI applications.
    If you get the error “HTTP Error 403.19 – Forbidden The configured user for this application pool does not have sufficient privileges to...
  • Roles and Features showing an error HRESULT: 0x800F0818 in Server Manager of windows server 2008 R2
    When you open Server Manager both Roles and Features display Error and you are unable to add any role or features. When you select the det...
  • Error - "Failed to retrieve data for this request (Microsoft.SqlServer.Management.sdk.sfc)"
    ErrError    - In Microsoft SQL Management Studio 2008, you receive the following error message when you try to expand the Databases:      ...
  • How to configure IIS 7 to redirect non-www domain to www domain?
    One of few legacy leftovers that was never dropped over the years is the common use of www domain prefix. It is not a problem per se for us...
  • Back up all MS SQL databases at once
    This article will discuss how to backup all MS SQL databases with one script. A separate file will be created for each database. Log into ...
  • The media family on device is incorrectly formed. SQL Server cannot process this media family Error: 3241
    When you try to restore a backup of the database you get the following error: The media family on device ” is incorrectly formed. SQL Server...
  • How to check Malware injection in Code
    To check Malware injection in your script/Code you can use a Web based Google Tool called “Webmasters Tools” You can find it here Google We...
  • An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
    If you are facing the following error while accessing the website: Error Summary HTTP Error 500.24 - Internal Server Error An ASP.NET settin...
  • Stopping Unneeded Services In Windows Server 2008
    By  default Windows 2008 starts with a number of services that actually do not need to be running. Many of these services can impact perfo...

Categories

  • booting Process
  • linux
  • redhat

Blog Archive

  • ►  2013 (68)
    • ►  July (1)
    • ►  May (2)
    • ►  April (11)
    • ►  March (54)
  • ▼  2012 (44)
    • ▼  September (20)
      • How to check Malware injection in Code
      • How to improve internet speed on your Windows XP D...
      • How to Change RDP Port
      • Could not load type ‘System.ServiceModel.Activatio...
      • Windows Login Error: An unauthorized change was ma...
      • How to Configure SmarterMail 9 site in IIS7
      • Back up all MS SQL databases at once
      • How to Install Smartermail 9
      • Back up Windows Server 2003 Registry
      • Map Local Drives through Remote Desktop
      • Stopping Unneeded Services In Windows Server 2008
      • Create a scheduled task in Windows Server 2008
      • Adjust Page File / Virtual Memory on Server 2008
      • Checking Available Diskspace For Windows 2008
      • Force Visitor Browser to use SSL
      • Enable multiple RDC sessions from one user in Wind...
      • Allow Passive FTP Access Through Windows 2008 Fire...
      • Set up an IP Security Policy Rule for Windows 2008...
      • Install PHPMyAdmin on IIS7 and Server 2008
      • Install MySQL on a Windows Server
    • ►  August (1)
    • ►  July (4)
    • ►  June (12)
    • ►  May (2)
    • ►  March (4)
    • ►  February (1)
  • ►  2011 (1)
    • ►  February (1)
  • ►  2009 (9)
    • ►  September (3)
    • ►  August (2)
    • ►  June (1)
    • ►  May (2)
    • ►  March (1)
Powered by Blogger.

About Me

Unknown
View my complete profile