Could not connect to MYSQL database

Helpdesk for my helpdesk software

Moderator: mkoch227

vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Could not connect to MYSQL database

Post by vinman57 »

Script URL: http://www.pianowizardacademy.com/helpdesk
Version of script: 421
URL of phpinfo.php: http://pianowizardacademy.om/phpinfo.php
URL of session_test.php: http://pianowizardacademy.com/session_test.php

Write your message below:

I keep getting this error when I go the SETTING PAGE (below test your connection)

Code: Select all

 Error: Could not connect to MySQL database using provided information! Please double-check your database settings 
MySQL said: Access denied for user 'Administrator'@'localhost' (using password: YES) 
I've been getting this a lot (though intermittant since the LAST update prior to 4.2.1.)

As I proceed with the other tabs in the admin area, the message above goes away. Aside from this, the program is functional

thanks
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

Could you take a screenshot of the error please and post it here?

In settings, is Debug mode ON or OFF?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Re: Could not connect to MYSQL database

Post by vinman57 »

As I mentioned, it happens intermittently - again today, but before I could get a screenshot it resolved itself again.

I'll get one to you next time it happens.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

This could be an issue with too many MySQL connections on the server - for example if your host has too many websites using MySQL on the server and the MySQL maximum number of connections limit is reached.

It's just a guess, if you do get a screenshot please let me know.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

Also, if you enable Debug mode (Settings > Help desk tab > Features > Debug mode: ON) it should give more information on the issue.

When you have the screenshot or an extended error message turn debug mode back to off.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Re: Could not connect to MYSQL database

Post by vinman57 »

Ok it happened again today

Screenshot at
www.pianowizardacademy.com/hesk.jpg

(all the fields are actually filled in, I just blocked them out for the screenshot)

Debug mode was enabled, but nothing shows.

As usual, when I go to the other tabs, as I go back and forth the
issue resolves itself and it says connection successful.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

Does the error show when you press the "Test MySQL connection" button or does it appear when you open the settings page without clicking any test buttons?

When the error shows if you then click "Test MySQL connection" does it resolve itself?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Re: Could not connect to MYSQL database

Post by vinman57 »

No, it just refreshes the same error.

So next, I click the next tab - "Help Desk" - and click save changes. Again, the error.
I click Save changes again, it works
go back to the General tab, error is gone, and test provides successful connection.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

Do you get the same problem, if you use unmodified Hesk files (original files without any changes or custom headers/footers)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Re: Could not connect to MYSQL database

Post by vinman57 »

Sorry, I wouldn't know as I have only used it with the header/footer.
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: Could not connect to MYSQL database

Post by lupolo »

Have the same problem.

Wenn trying to save settings within Hesk.

--->
Fout:
Kan geen connectie maken naar de MySQL database! Controleer goed je database-instellingen
MySQL zegt: Access denied for user 'MySQL'@'localhost' (using password: YES)

WAARSCHUWING
Debug mode staat aan. Overtuig jezelf ervan dat debug mode uit staat wanner je HESK helemaal ge�nstalleerd hebt en in gebruik neemt.


The strange thing is that i could edit tickets, or search them.

It's after i upgrade to a IIS server, have modified the rights to the php file and upload folder.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

That message means PHP cannot connect to MySQL using the details you provided.

It's a configuration issue, not something I can help with.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Re: Could not connect to MYSQL database

Post by lupolo »

But why does every thing else works? Exept wenn saving the settings.

So the ticket its self work, only wenn saving settings.
vinman57
Posts: 65
Joined: Thu Jan 17, 2008 4:13 am

Re: Could not connect to MYSQL database

Post by vinman57 »

I still get it too. The only workaround I have found it to select the next tab, then click the Save button, and now the connection works - then I go back to the tab I wanted to have the content changed and it works from there during the rest of that session. I have no idea why.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Could not connect to MYSQL database

Post by Klemen »

Can you make another screenshot of the error (so I see exactly where it happens) and exact steps to reproduce?

Does the same thing happen with original HESK files and English language file?

Also, please let me know again details of where is HESK installed (server type, PHP version, MySQL version, ...) and what browser you are using (the links you posted originally don't work anymore).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply