We help IT Professionals succeed at work.

Kohana MySQL connection problem

William-B asked
Last Modified: 2014-08-21
I am currently using iPage to host a site I am developing.  I am having a problem though with a connection to the MySQL server using Kohana.  I am including the error message and my current database configuration in this message.  I know it might just be a MySQL error given the error message, but I though I would include that I'm using Kohana just in case.  I have contacted iPage to ask them about it, but their customer support is abysmal at best and it seemed that they really didn't have any idea what I was talking about, although I did manage to confirm that localxingcom.ipagemysql.com was the correct server address.  Unfortunately I can't include a link to the site as it is currently password protected and under development.  I'm hoping that what I'm including will be enough information to at least steer me in the right direction.  Thanks in advance.

Kohana Error Message:

Database_Exception [ 2 ]: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Current database setup as contained in database.php:

return array(
    'default'           => array(
        'type'          => 'mysql',
        'connection'    => array(
            'hostname'  => 'localxingcom.ipagemysql.com',
            'username'  => 'web_connection21',
            'password'  => '*************',
            'persistent'=> FALSE,
            'database'  => 'main_table86'
        'table_prefix'  => '',
        'charset'       => 'utf8',
        'profiling'     => TRUE,
        'caching'       => FALSE
Watch Question

MurfurFull Stack Developer

That is an error being reported by the host server and would suggest that MySQL is not actually running or that it is misconfigured and therefore not visible over IP e.g. the bind-address setting in my.cnf

Can you confirm that the MySQL service is running?


I'm assuming that it is running, I can access it from iPage's MySQL web interface (mysqladmin).  I am not sure if this is related but I was trying to set up a connection to the database using MySQL Workbench which didn't work, but I was assuming that was more of a remote configuration error than a server one.  At any rate it wasn't essential, just more of a convenience, so I didn't really follow up on it.  According to the web interface:  This MySQL server has been running for 33 days, 20 hours, 6 minutes and 6 seconds. It started up on Jul 17, 2014 at 01:51 PM.
Full Stack Developer
This one is on us!
(Get your first solution completely free - no credit card required)


Well it would seem that the problem has resolved itself.  I checked early yesterday morning and I was getting the same error.  I tried again yesterday afternoon and, without me doing anything, the message disappeared.  Now I'm getting a message that my session is corrupt, but hopefully I can track down that problem.  Thanks for your help, I guess it's too bad that I don't actually know what was wrong, but for the information for the future - full points.
MurfurFull Stack Developer

Many thanks!

As to your session, a corrupt session suggests to me session cookies so delete them then reload the page...

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.