I encountered the following errors in partkeepr.log.
[2021-06-18 09:33:18] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'" at /var/www/PartKeepr-1.4.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at /var/www/PartKeepr-1.4.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\\DBAL\\Driver\\PDOException(code: 1698): SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at /var/www/PartKeepr-1.4.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 1698): SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' at /var/www/PartKeepr-1.4.0/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []
Kindly advice how do i fix this error.
And also, do i need to create the database as shown below before i execute the steps in PartKeepr Setup part A? Thanks.
Manually create the databaseYou can find some description of the database creation commands here MySQL Create Database.
Use following set of command to create the database
> mysql -u root -p
Enter password:
mysql> CREATE DATABASE te_mpe_ep CHARACTER SET UTF8;
mysql> CREATE USER daniel@localhost IDENTIFIED WITH mysql_native_password BY 'daniel';
mysql> GRANT USAGE ON *.* TO daniel@localhost;
mysql> GRANT ALL PRIVILEGES ON te_mpe_ep.* TO daniel@localhost;
mysql> quit
Note: for the dump of the database (11 - Backup Import Export MySQL tables) may be you need to add the global PROCESS privilege to the user running the command
mysql>GRANT PROCESS ON *.* TO daniel@localhost;
you can use the following to verify that the database and the user were created
mysql> SHOW DATABASES;
mysql> SELECT User FROM mysql.user;
mysql> quit
if needed you can restart the MySQL service
>service mysql restart
you can use the following that MySQL is running ok
>service mysql status
to explicitly change an already existent user to use mysql_native_password you can use these commands
mysql> ALTER USER 'daniel'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daniel';
mysql> FLUSH PRIVILEGES;
with the database created and running ok ...