How to set different port no for MySql database in Magento

March 28, 2010
Filed under: Databases, eCommerce, Featured, Magento Cart, MySql, Shopping Carts 

How to set different port no for mysql database in Magento

Open the Configuration file where you setup database properties, i.e app/etc/local.xml




Just Replace the PORTNO in below xml with your port number.

<default_setup>

<connection>

<host><![CDATA[HOSTADDRESS]]></host>

<username><![CDATA[USERNAME]]></username>

<password><![CDATA[PASSWORD]]></password>

<dbname><![CDATA[DBNAME]]></dbname>

<port><![CDATA[PORTNO]]></port>

<active>1</active>

</connection>

</default_setup>

Comments

2 Comments on How to set different port no for MySql database in Magento

  1. Helder on Thu, 4th Nov 2010 3:46 pm
  2. I tried this on a Magento environment which is currently connected to a MySQL 4 DB on port 3306. I set up MySQL 5 on port 3307 and after trying it, it keeps connecting to port 3306, it just ignores the new port/DB.

    I even tried manually deleting var/cache and var/session, but it didn’t work.

    Any ideas?

  3. Steven Robert on Fri, 5th Nov 2010 1:02 am
  4. @helder After the host name u need to give localhost:3307, Then it will work.

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image