Answer the question
In order to leave comments, you need to log in
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
In this version and beyond - there is no temporary password. After installation, you need to create it:sudo mysql_secure_installation
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question