Page 1 of 1

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

Posted: Wed Jun 24, 2020 9:00 pm
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?

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

Posted: Thu Jun 25, 2020 7:48 am
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).

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

Posted: Thu Jun 25, 2020 1:36 pm
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.)

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

Posted: Thu Jun 25, 2020 1:40 pm
by Klemen
Are you able to install Hesk using root MySQL user?

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

Posted: Thu Jun 25, 2020 1:46 pm
by christcpd
Nope. Tried that as well. :( Can access MySQL with root via phpmyadmin and MySQL console.

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

Posted: Thu Jun 25, 2020 1:50 pm
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.";
}

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

Posted: Thu Jan 02, 2025 6:16 pm
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

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

Posted: Thu Jan 02, 2025 8:11 pm
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.