ubuntu mariadb mysql root access denied after mysql_secure_installation
mariadb-cannot-login-as-root
https://stackoverflow.com/questions/43379892/mariadb-cannot-login-as-root
exec command (need no password) :sudo mysql
Unlike native MariaDB packages (those provided by MariaDB itself), packages generated by Ubuntu by default haveunix_socketauthentication for the local root. To check, run
SELECT user, host, plugin FROM mysql.user;
If you seeunix_socketin theplugincolumn, that’s the reason.
To return to the usual password authentication, run
UPDATE mysql.user SET plugin = ” WHERE plugin = ‘unix_socket’; FLUSH PRIVILEGES;
(choose theWHEREclause which fits your purposes, the one above is just an example)
Similar Posts:
- [Solved] MYSQL Error: this authentication plugin is not supported
- MySQL [ERROR] Table ‘mysql.user’ doesn’t exist
- Solve the problem of unknown column ‘password’ in ‘field list’ in MySQL
- After installing mysql, centos7 can’t start the service, and prompts unit not found
- MySQL Connect Error: Authentication plugin ‘caching_sha2_password’ cannot be loaded
- [Solved] MYSQL Install and Login Error: Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- [Solved] Mysql 5.7 Change Passwords ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’
- [Solved] Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- MYSQL 8.0 Login Error: caching_sha2_password [How to Solve]