Installation Step 1 MySQL Connect Error

I just installed MySQL 5.6 on CentOS 7 and root password is configured.

MySQL login on my localhost is successful as below.


[root@test]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 34
Server version: 5.6.30 MySQL Community Server (GPL)

Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

However, Dolibarr on the step1 page that I need to connect to MySQL says as below.


Access denied for user ‘root’@‘localhost’ (using password: NO)
The database connection failed: the host or super user parameters must be wrong.

mysqld.log says


2020-06-26T05:31:47.878390Z 27 [Note] Access denied for user ‘root’@‘localhost’ (using password: NO)
2020-06-26T05:36:12.328126Z 28 [Note] Access denied for user ‘root’@‘localhost’ (using password: NO)
2020-06-26T05:53:18.872033Z 29 [Note] Access denied for user ‘root’@‘localhost’ (using password: NO)
2020-06-26T05:53:35.232340Z 30 [Note] Access denied for user ‘root’@‘localhost’ (using password: NO)
2020-06-26T06:06:34.293625Z 35 [Note] Access denied for user ‘root’@‘localhost’ (using password: NO)

The password is correct and it is fresh installed MySQL. I tried mysqld_safe --skip-grant-tables to remove my password and it works without password but sql scripts cannot run. Thus, password configuration is required for security purposes.

phpmyadmin is accessible with the same MySQL ID and PW.

Will it be the dolibarr problem?(but I doubt it because it is an initial setup stage) or there is something that I can do on the MySQL side?

Thanks,