The problem is quite frequent, I tried all the tips from the English-language stack`a, but it does not work. Once I installed the MySQL client and server, I dabbled, now I needed to install everything normally, using this cheat sheet I cleaned everything that was connected with MySQL Server & Client and now installed it in a new way, through
sudo apt-get install mysql-server mysql-client
In theory, during installation, they should offer to set a password for root, but this did not happen.
When everything is established, I enter the command mysql -u root
Access denied for user 'root' @ 'localhost' (using password: NO)
I tried to perform the following actions:
sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables &
Then got this:
2019-02-26T15: 23: 51.419680Z mysqld_safe Logging to syslog. 2019-02-26T15: 23: 51.425030Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2019-02-26T15: 23: 51.429211Z mysqld_safe Directory '/ var / run / mysqld' for UNIX socket file don't exists.
sudo mysql
? And in general, what version of MySQL are we talking about? From this will depend on the recipes "treatment". If version 5.7 or fresh, then you can set the password, it seems, through thesudo mysql_secure_installation
. - Vladimirmysql_secure_installation
password will bemysql_secure_installation
to enter only if you give up the first two points (something about additional checks and authentication via a socket). If you have not abandoned the new authentication (via socket), then there will be no password. And then, it seems, the input will be allowed only throughsudo mysql
. - Vladimirsudo mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Access denied for user 'root'@'localhost' (using password: NO)
sudo mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: Error: Access denied for user 'root'@'localhost' (using password: NO)
that is, no matter what I click there, he asks for a password anyway - Hundreds of Personssudo mysql
command? So, too, does not let? - Vladimir