Я устанавливаю 5.7 версию, в этой версии не задается же пароль для root?
И вообще первый раз слышу что в логах можно найти пароль от root, не нашел такого.
Развернул все в вагранте.
Чистая 7-ка. mysql из соответтсвующего репо.
вторая команда в консоли ищет временный пароль. это поведение в официальном mysql есть уже хз сколько времени, несколько лет точно.
[vagrant@localhost ~]$ sudo systemctl start mysqld
[vagrant@localhost ~]$ sudo grep password /var/log/mysqld.log
2020-04-28T12:45:03.044588Z 1 [Note] A temporary password is generated for root@localhost: z*3ag#dedwJ%
[vagrant@localhost ~]$ sudo mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
The existing password for the user account root has expired. Please set a new password.
New password:
Re-enter new password:
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
[vagrant@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[vagrant@localhost ~]$ rpm -qa | grep mysql
mysql80-community-release-el7-3.noarch
mysql-community-libs-5.7.30-1.el7.x86_64
mysql-community-libs-compat-5.7.30-1.el7.x86_64
mysql-community-server-5.7.30-1.el7.x86_64
mysql-community-common-5.7.30-1.el7.x86_64
mysql-community-client-5.7.30-1.el7.x86_64
[vagrant@localhost ~]$