Why connect to MySQL in build action hooks fails on Openshift

Solution Verified - Updated -

Issue

  • Using build action hooks below error is seen :
remote: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  • How to connect to mysql using build action hook on Openshift.

Environment

  • Openshift Enterprise
    • 2.1
  • Openshift Online

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.