Kohana MySQL connection problem

Hello,
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
    )
);
William-BAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MurfurFull Stack DeveloperCommented:
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?
0
William-BAuthor Commented:
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.
0
MurfurFull Stack DeveloperCommented:
You said earlier that you had confirmed that localxingcom.ipagemysql.com was the correct server address so it could be the user account does not have permissions as that is also restricted by source IP i.e. the IP address of the 'client' requesting to connect. Similarly the web server appears to be remote from the MySQL server so it is possible that port 3306 is blocked at the MySQL server firewall (3306 is the default and you have not specified an alternate in your connection string).

You also said that you could not make a connection within MySQL Workbench which add weight to the firewall/user theories so which is it?

Relatively easy to check the user account in the MySQLAdmin assuming you have rights to do so:
web_connection21 @ localhost and
web_connection21 @ 123.456.789.012
are effectively two separate user accounts so you need to make sure there is one for the IP address of your web server. Same goes for your workstation access through MySQL Workbench.

Of course, you could aways drop a line to the DBA and ask them if you have the correct connection details and if the ports etc. are open...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
William-BAuthor Commented:
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.
0
MurfurFull Stack DeveloperCommented:
Many thanks!

As to your session, a corrupt session suggests to me session cookies so delete them then reload the page...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.