W
W
Web Jovi2018-07-25 12:51:10
MySQL
Web Jovi, 2018-07-25 12:51:10

How and where to see the temporary root password in MySQL under Ubunut 18.04?

Installed Ubuntu 18.04, launched the installation of the MySQL server and was surprised that during the installation it did not ask for a password for root, as it did before. Googling, I read that in new MySQL versions it is not suggested to set a password during installation, and now it is generated and written to the file: /var/log/mysqld.log
But there is no such file in Ubuntu, editing configs does not help. Tips from bourgeois sites do not help (they are mainly for those who have forgotten the password), and in Runet they have not even heard about this problem.
It is impossible to start the mysql client with root without a password, the old methods of resetting the password do not work (and it’s not like that).
Who faced similar? Or is it a glitch in the new version of Ubuntu?
upd: On the advice of SagePtrI logged in under the debian-sys-maint system user from the /etc/mysql/debian.cnf file. I got into the console, but now I can’t change the password for the root user. Command:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_pass';
didn't help. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
Henry, 2018-07-25
@mcivhjfv

In this version and beyond - there is no temporary password. After installation, you need to create it:
sudo mysql_secure_installation

S
SagePtr, 2018-07-25
@SagePtr

In debian and derivatives (including ubuntu) there is a user debian-sys-maint, which has full rights and its password is generated in the /etc/mysql/debian.cnf file, you can go under it and reset the root password.

D
Denis, 2018-07-25
@sidni

i solved the problem like this
https://help.ubuntu.com/community/MysqlPasswordReset

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question