How to set different port no for MySql database in Magento

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>

2 thoughts on “How to set different port no for MySql database in Magento”

  1. 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?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
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