2

MariaDB root password error

 2 years ago
source link: https://marco.dev/spring-boot-mariadb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

MariaDB root password error


Hey can you help, please? Would you write 1 idea to improve this post or for a new post?

You just installed MySQL or MariaDB and you receive this error: Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges. How to solve it? In many websites there are a lot of different approaches and solutions, often with 5 or more steps to do.

A working solution for old systems is to execute ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

if you get: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY 'password'' at line 1 ... then your version of MariaDB is not compatible with this solution.

In this case is better to use

sudo mysql 
 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password USING PASSWORD('password');` this should correctly reset your password. 

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK