Page 1 of 1

Upgrade to ZS 9.1 : Access denied for user 'root'@'localhost

PostPosted: Fri Sep 22, 2017 2:58 pm
by chiefbeef
I recently upgraded from ZS 8.5 to 9.1. The 8.5 installation could not be updated, but had to be uninstalled. Following the installation of ZS9.1, i am getting the following message when trying to connect to the database:
Connect Error: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

...despite no database credentials in my sites being changed. I assumed that ZS9.1 may have a different default username/password combination, but this page states the default username/password are "root"/"" (empty string) - which is what i have in my config files, but am still getting the above error message.

Re: Upgrade to ZS 9.1 : Access denied for user 'root'@'local

PostPosted: Fri Sep 22, 2017 3:05 pm
by chiefbeef
db.development.php
<?php
return [
'db' => [
'username' => 'root',
'password' => '',
'host' => 'localhost',
'dsn' => 'mysql:dbname=myDbName;host=localhost',
'driver' => 'Pdo',
'driver_options' => [
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
]
]
];

Re: Upgrade to ZS 9.1 : Access denied for user 'root'@'local

PostPosted: Sat Sep 23, 2017 8:50 am
by chiefbeef
After some investigations i realised that the mysql installation has no Data folder. So i opened a console (win10), navigated to the mysql directory and ran mysqld --initialize, which then created the folder, but subsequent calls to mysqld show users or mysqld create user... have no effect - users table is still empty. I also tried deploying phpMyAdmin via ZS but am getting the same access denied message. Any ideas on how to proceed?

Re: Upgrade to ZS 9.1 : Access denied for user 'root'@'local

PostPosted: Wed Sep 27, 2017 9:39 am
by zend_eyalt
Hi there,

did you install the bundled MySQL that comes with Zend Server 9.1 ? If so the default password has been changed to "rootpasswd".

Regarding the information at http://files.zend.com/help/Zend-Server/ ... onents.htm - you're right - we will make sure that the password will be updated there to the correct one.

thanks,
Eyal