MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
christcpd
Posts: 3
Joined: Wed Jun 24, 2020 8:52 pm

MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by christcpd »

Script URL:
Version of script: 2.8.6 or 3.1.1
Hosting company: localhost
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: localhost
access denied

Write your message below:
When trying to install to WAMP localhost, keep getting:
MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

MySQL is working just fine. User is created and can log in via phpmyadmin. hesk db is present.

Is there a trick to getting HESK to install locally?
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by Klemen »

No trick; in fact, I'm using WAMP on my PC myself.

This error simply means your MySQL user is not set up correctly (doesn't have access to the MySQL database you are trying to use). It's an error MySQL generates, not Hesk.

Make sure the hesk_owner user has granted permission for the MySQL database you are trying to use over the host "localhost" ("Host Name" should be "localhost" not "%" when viewing User accounts in phpMyAdmin).
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
christcpd
Posts: 3
Joined: Wed Jun 24, 2020 8:52 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by christcpd »

Thanks Klemen,

Yes, I am aware of that. As I mentioned, the hesk_owner can access phpmyadmin and all databases within. It can make any changes to that db and all others.

That is why I was stumped and came to the forums. I have extensive experience with WAMP and LAMP stacks. Whenever I have seen this occur in the past, given the phpmyadmin access, it has always turned out to be something with the third party configuration (wrong port, not passing correctly, etc.)
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by Klemen »

Are you able to install Hesk using root MySQL user?
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
christcpd
Posts: 3
Joined: Wed Jun 24, 2020 8:52 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by christcpd »

Nope. Tried that as well. :( Can access MySQL with root via phpmyadmin and MySQL console.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by Klemen »

Well, that's strange. You aren't running MySQL on a non-standard port, are you?

What do you get if you save the below code as "test.php", change user, pass and db, save to your Hesk folder and run in your browser?

Code: Select all

<?php
$mysqli_connection = new MySQLi('localhost', 'user', 'pass', 'db');
if ($mysqli_connection->connect_error) {
   echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else {
   echo "Connected.";
}
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
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by morphisto.zet »

Hi there,

I just ran into quite the same problem today when updating my HESK in my DEV-instance:

HESK overall was running fine, but when I opend admin_settings_general.php and wanted to save I got:

Code: Select all

(1045) Access denied fo user 'heskDBAdmin'@'localhost' (using password: YES)
Had quit a time today finding out, that the new mysql-password had a "<" within. Because the password is send in plain text every time saving on this page (even though I hadn't changed it) to the admin_settings_save.php the "<" was replaced with &gt;

I haven't fount any hint in the setup-docs, or the knowledgebase. Maybe you could add this to the setup-documents, which special-characters are allowed as sql-password, so nobody else runs into this trap ;-)

best regards
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: MySQL said: Access denied for user 'hesk_owner'@'localhost' (using password: YES)

Post by Klemen »

Thanks for the heads up. This used to work well if I remember correctly, so something in a recent update must have changed the behavior.

Will check and fix in a future update.
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