Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO))  [SOLVED]

Locked
silenzium
Posts: 26
Joined: Thu 30. Nov 2017, 10:59

Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO))

Post by silenzium »

Hello,

first of all thanks for the free admin panel.

I just wanted to install it to try it out but got errors during installation. I try to install on a fresh setup Debian 9 LAMP Stack from Hetzner.
When I first started the installation with the

Code: Select all

installkeyhelp.sh
I got an error "Access denied for user 'root'@'localhost' (using password: NO)", so I opened mariadb and reset root passwort with

Code: Select all

SET PASSWORD FOR root@localhost=PASSWORD('');
and rerun the

Code: Select all

installkeyhelp.sh
Then it went through untill the configuration step where I can change admin user name and password etc.
Then I hit "S" for "Start install" and the following happened:

Code: Select all

Installation is running:

Update sources list ...                     [OKAY]
Installation requirements ...               [OKAY]
Sudo ...                                    [OKAY]
Bind9 ...                                   [OKAY]
SSL ...                                     [OKAY]
PHP ...                                     [OKAY]
Apache ...                                  [OKAY]
PHP-FPM ...                                 [OKAY]
MariaDB ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line                                    170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
KeyHelp ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line                                    170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
Firewall (iptables) ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line                                    170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
SSH ...                                     [OKAY]
ProFTPD ...                                 [OKAY]
Postfix ...                                 [OKAY]
Dovecot ...                                 [OKAY]
Email protection
    Postgrey, Amavis, ClamAV,
    SpamAssassin, Pyzor, Razor ...          [ERROR]
AWStats ...                                 [ERROR]
Fail2ban ...                                [ERROR]
Logrotate ...                               [ERROR]
PhpMyAdmin 4.7.5 Multilanguage ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
Roundcube 1.3.3 Multilanguage ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
Rainloop 1.11.0.203 (Community Edition) ...
Warning: MySQL - Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170
[ERROR]
Quota ...                                   [ERROR]
Apparmor ...                                [ERROR]
7-Zip ...                                   [ERROR]
Nano ...                                    [ERROR]
NTP ...                                     [ERROR]
Cron-Daemon ...                             [ERROR]

Warning: MySQL - Connection Error: 1045 (Access denied for user 'keyhelp'@'localhost' (using password: YES)) in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 49

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 50

Warning: mysqli::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 69

Warning: DBConnection::query(): Couldn't fetch mysqli in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 70

Warning: MySQL - Query Error:  () in /home/keyhelp/www/keyhelp/core/pending/DBConnection.php on line 170

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on null in /home/keyhelp/www/keyhelp/core/Settings/Settings.php:240
Stack trace:
#0 /home/keyhelp/www/keyhelp/core/Settings/Settings.php(51): Settings->loadSettings()
#1 /home/keyhelp/www/keyhelp/install/install.php(829): Settings->__construct(Object(DBConnection))
#2 {main}
  thrown in /home/keyhelp/www/keyhelp/core/Settings/Settings.php on line 240
And now I can not access

Code: Select all

mysql -u root
anymore. Does the installer change the mysql root password during the installation and what can I do to successfully install KeyHelp?

Thanks in advance!
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO))

Post by Alexander »

Hello silenzium,
I try to install on a fresh setup Debian 9 LAMP Stack from Hetzner.
KeyHelp requires a clean (minimal) operating system set up on the server. The components included in a LAMP image all get installed and configured by KeyHelp during its installation process, so it is not advisable to install them in advance.

The reason why KeyHelp fails in particular in your situation is, that there is already a MySQL/MariaDB installation on your system due to the LAMP image. KeyHelp needs the root access to the database to fullfill various tasks and is unable to receive the login credentials for this database.

Solution: Reset your server and choose the Hetzner minimal image of your desired operating system - then start the KeyHelp installation again.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
silenzium
Posts: 26
Joined: Thu 30. Nov 2017, 10:59

Re: Connection Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO))  [SOLVED]

Post by silenzium »

I just retried with a fresh Debian 9 minimal setup (no LAMP) and it worked!

Thanks!
Best, Lorenz
Locked