jump to navigation

MySQL 5 Installation issue on Windows Vista December 27, 2008

Posted by ninadgawad in General, MySQL, Windows Vista.
1 comment so far

I was trying to install MySQL 5.0.24 on my friends new Laptop. We where stuck at this error “The application has failed to start because its side-by-side configuration is incorrect.Please see the application event log for more detail” when we ran the MySQLInstanceConfig.exe file. After a bit of googling we found the solution.

Step1: Download the Resource Hacker tool from here.

Step2: Unzip the folder and execute the file “ResHacker.exe”. This open a window, Go to File > Open and browse to the Path of your “MySQLInstanceConfig.exe” file inside “<Drive>:\MySQL\MySQL Server 5.1\MySQLInstanceConfig.exe”. This will load an assembly file, on your left navigational tree section click on folder 24 > 1 > 1003. This opens an XML configuration file.

Step3: Edit this file by changing the privilege “asAdministrator” to “requireAdministrator”.  Click button on the top of window which states “Compile Script”. Now go to File > Save as.  Save the File with name “MySQLInstanceConfig.exe” on the desktop.

Close the Resource Hacker tool, copy the “MySQLInstanceConfig.exe” file from desktop and overwrite it on the exisiting file in “<Drive>:\MySQL\MySQL Server 5.1\bin” folder.

Double click on the exe and the instance installation will begin.

References:

Downloads:

  • Download MySQL from here.
  • Check Windows Vista here.

Enabling SSL for Apache 2 December 21, 2008

Posted by ninadgawad in Uncategorized.
Tags: , ,
4 comments

Secure Socket layer (SSL) has been a standard protocol for providing security and data integrity for web based applications. This tutotrial will provide you with steps to SSL enable your Apache based Web Application using OpenSSL for windows based environment.

Step1: Donwload/Install Apache

  • Download Apache HTTP Server from here. Get the apache_2.2.11-win32-x86-openssl-0.9.8i.msi installer and install the Apache Server.
  • Open the conf/httpd.conf file and check if the line “LoadModule ssl_module modules/mod_ssl.so” is commented or not. If commented then uncomment the line and check if the file “mod_ssl.so” is available in the ‘modules’ folder, if not then you have downloaded the non ssl version of Apache please download the apache with openssl version and install it.
  • Create a file named “ssl.conf” in the ‘conf’ folder which will hold all the ssl related configurations.Add the following line to “httpd.conf” file. <IfModule mod_ssl.c>
    Include conf/ssl.conf
    </IfModule>

Step2: Add SSL Certificate

  • The second step is to add the SSL certifcate to the SSL configuration file, the certificate can be either self created or we can get them from Certifcate Authority, getting this from Trusted Certificate Authority is a better idea since this will not display warning to the users who connect to your application. Self signed SSL certificate can be used for demonstration purpose for small applications or in an intranet environment.
  • Go to the ‘bin’ folder of the Apache and check if you have “openssl.exe” binary there, we will use this tool to create the self signed certificate.
  • Download the “openssl.conf” file from here and place it in the ‘bin’ folder.(rename the opensslcnf.doc to openssl.cnf once downloaded)
  • Go to the command prompt where the have “openssl.exe” file.
    Run the following command to create a new certificate request:
    prompt>openssl req -config openssl.cnf -new -out mycert.csr -keyout mycert.pem
    You’ll be prompted to fill answers to many questions. Remember your PEM pass phrase which you have entered. Now we need to create a nonpassword protected key for Apache 2 by running the following command:
    prompt>openssl rsa -in mycert.pem -out mycert.key
    This will create a key file as earlier but one without password protection.To create this file just enter your pass phrase given earlier.
    Lastly we need to create the X.509 public certificate.
    Run the following command:
    prompt>openssl x509 -in mycert.csr -out mycert.cert -req -signkey mycert.key -days 365
    This create the self signed certificate which expires after 365 days.

Step3: Configure the “ssl.conf” file.

  • Create a folder ‘ssl’ under ‘conf’ folder to keep your SSL key and certificate files. Add the two files created in the previous step “mycert.key” and “mycert.cert” file inside this folder.
  • Open “ssl.conf” file and change the line DocumentRoot, ServerName and ServerAdmin as per your http.conf file. (Note: Its recommended to keep the SSL port as 443 since many firewalls block SSL on other ports).
  • Now change the lines SSLCertificateFile and  SSLCertificateKey to path where the key and cert files in ‘ssl’ folder are kept. SSLCertificateFile conf/ssl/mycert.cert
    #SSLCertificateFile conf/ssl/server-dsa.crt#   Server Private Key:
    #   If the key is not combined with the certificate, use this
    #   directive to point at the key file.  Keep in mind that if
    #   you’ve both a RSA and a DSA private key you can configure
    #   both in parallel (to also allow the use of DSA ciphers, etc.)
    SSLCertificateKeyFile conf/ssl/mycert.key
    #SSLCertificateKeyFile conf/ssl.key/server-dsa.key
  • That’s all, just save the changes & restart the Apache Server.
  • Open “https://localhost/&#8221; to test SSL.

(Note: We have assumed that Apache is running on port 80 and SSL on port 443 you can configure for any other port)

If you already have the Certificate’s provided to you from Certificate Authority just skip step two and put these certificates inside the ‘ssl’ folder and add there respective path in the “ssl.conf” file.

You just got your Apache SSL enabled.