Having troubles connectiong Magento to external Windows Database Server using Windows Azure

Posted by Kevin H on Server Fault See other posts from Server Fault or by Kevin H
Published on 2012-11-06T18:36:23Z Indexed on 2012/11/07 11:06 UTC
Read the original article Hit count: 360


"I tried to make this easy to read through"

I am using Ubuntu 12.04 LTS for Magento and installed these commands onto the system:

sudo apt-get install apache2

sudo apt-get install php5 libapache2-mod-php5

sudo apt-get install php5-mysql

sudo apt-get install php5-curl php5-mcrypt php5-gd php5-common

sudo apt-get install php5-gd

I used Windows Server 2008 R2 August 2012 for Mysql Server

For a reference, I used http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-mysql/

When the server was setup, I added an empty disk to it

Then, I added endpoints 3306

Next I accessed the server remotely

After that, I formatted the empty disk and was inserted as F:

Next I downloaded Mysql from http://*.mysql.com version Windows (x86, 64-bit), MSI Installer 5.5.28

In the installation process, I used these settings:

  1. Typical Setup - Clicked Next, install, next
  2. Chose Detailed Configuration - Clicked next
  3. Chose Dedicated MySQL Server Machine - Clicked Next
  4. Chose Transactional Database Only - Clicked Next
  5. Chose the "F:" Drive - Clicked Next
  6. Chose Online Transactional Processing (OLTP) - Clicked Next
  7. For Networking Options, I checkmarked 'Enable TCP/IP Networking" 'Add firewall exception for this port' 'Enable Strict Mode' - Clicked Next
  8. Chose Standard Character Set - Clicked Next
  9. For Windows Options, I checkedmarked 'Install as Window Service" 'Launch the MySQL Server automatically' 'Include Bin Directory in Windows PATH - Clicked Next
  10. For Security Options, I checkmarked 'Modify Security Settings' and set root password - Clicked Next
  11. Finally clicked Execute and Finish

These are the Firewall Setting that I set

  1. I clicked inbound rules
  2. Properties
  3. Scope
  4. Allow IP Address and used the internal Address for Magento Server
  5. Clicked Apply and exited

Next, I opened up MySQL 5.x Command Line Client

  1. Entered Root Password
  2. Then entered these commands
  3. mysql> create database magento;
  4. mysql> Create user magentouser identified by 'password';
  5. mysql> Grant select, insert, create, alter, update, delete, lock tables on magento.* to magentouser
  6. mysql> exit

Finally, I opened up the Magento Downloader

Magento validation has approved all

PHP version is right. Your version is 5.3.10-1ubuntu3.4.

PHP Extension curl is loaded

PHP Extension dom is loaded

PHP Extension gd is loaded

PHP Extension hash is loaded

PHP Extension iconv is loaded

PHP Extension mcrypt is loaded

PHP Extension pcre is loaded

PHP Extension pdo is loaded

PHP Extension pdo_mysql is loaded

PHP Extension simplexml is loaded

These are all installed on Magento Server


For the Database Connection, I used:

The Database server only has MySQL 5.5 Server installed on it

  1. Host - Internal IP address
  2. User Name - The User I created when setting up database
  3. Password - The Password I created when setting up database

For the password, I did some research and found out that Magento only accepts alphanumeric, so I went and set it up again and used only alphanumeric for the User password

Now, I am still getting Accessed denied for database Connection.

Also, I have tryed to setup mysql on independant Linux Server but kept getting errors. When, I found the solution. Wouldn't work, so I decided to try Windows.

These is the questions, I have been asking and researching to debug this issue

  1. Is it because I am using Linux for magento and Windows for Database. I have had no luck in finding a reason why this wouldn't work
  2. There must be something, I am missing
  3. I also researched the difference between linux sql databases and windows sql databases but have not come to conclusion, if installing Mysql on windows would make a difference in syntax and coding.

I have spent a lot of time looking into this and need some help with direction on how to complete my project. Any type of help would be appreciated.

© Server Fault or respective owner

Related posts about linux

Related posts about magento