Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6820387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:25:07+00:00 2026-05-26T21:25:07+00:00

<default_setup> <connection> <host><![CDATA[10.1.39.35]]></host> <username><![CDATA[user]]></username> <password><![CDATA[password]]></password> <dbname><![CDATA[db_magento]]></dbname> <active>1</active> </connection> </default_setup> My local.xml file configuration is

  • 0
 <default_setup>
                <connection>
                    <host><![CDATA[10.1.39.35]]></host>
                    <username><![CDATA[user]]></username>
                    <password><![CDATA[password]]></password>
                    <dbname><![CDATA[db_magento]]></dbname>
                    <active>1</active>
                </connection>
            </default_setup>

My local.xml file configuration is shown above.
I am getting this error

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Trace:
#0 /home/ecosmart/public_html/e-nrg.com/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/ecosmart/public_html/e-nrg.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(251): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/ecosmart/public_html/e-nrg.com/lib/Zend/Db/Adapter/Abstract.php(448): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/ecosmart/public_html/e-nrg.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/ecosmart/public_html/e-nrg.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#7 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(297): Mage_Core_Model_Resource->getConnection('core_read')
#8 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(312): Mage_Core_Model_Mysql4_Abstract->_getConnection('read')
#9 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Mysql4/Cache.php(41): Mage_Core_Model_Mysql4_Abstract->_getReadAdapter()
#10 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Cache.php(424): Mage_Core_Model_Mysql4_Cache->getAllOptions()
#11 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Cache.php(459): Mage_Core_Model_Cache->_initOptions()
#12 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/App.php(1101): Mage_Core_Model_Cache->canUse('config')
#13 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Config.php(404): Mage_Core_Model_App->useCache('config')
#14 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/Config.php(286): Mage_Core_Model_Config->_canUseCacheForInit()
#15 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/App.php(359): Mage_Core_Model_Config->loadModulesCache()
#16 /home/ecosmart/public_html/e-nrg.com/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initModules()
#17 /home/ecosmart/public_html/e-nrg.com/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#18 /home/ecosmart/public_html/e-nrg.com/index.php(83): Mage::run('', 'store')
#19 {main}

I have been looking on the internet, and I can’t find someone with the same problem as this = everyone says that this occurs when they are running their local mysql on a different port. I am not, I am running a seperate server with a database that is networked through an internal network.

Does anyone know a workaround to stop magento using the MYSQL socket connection and force it to use the TCP protocol?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:25:08+00:00Added an answer on May 26, 2026 at 9:25 pm

    Did you clean your cache? rm -rf var/cache

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to deploy my DB file in the Users\CurrentUserName\AppData folder, because default User
Possible Duplicate: how to read a xml file using java? I want to the
I recently set up a Nginx server to host a wordpress install and am
I am using HttpClient 4.02 to create a connection via proxy (using the CONNECT
The WSAT throws the following irrespective of the project or the connection type, An
I have an application that is using Windows Authentication and a SqlRoleProvider for user
I have setup a VM (VMWEB-3) to test local development of Orchard CMS using
I am using attempting to create a connection to an Oracle database via entity
Let's say I have an object Employee_Storage that contains a database connection data member.
First things first: Server is an Apache running on Debian in a VMPlayer Host

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.