Recent study spring frame appears Access denied forr user 'root @ localhost' the problem is that when connecting to the database will report this error, because I always thought that linux permission to let you must use the root can log in to the mysql or mariadb database, if the average user will report this error, I find a lot of stuff, and finally found that there is this problem, so my solution is to provide a method here:
That is to allow ordinary users can also log in to the mysql database:
Solution:
sudo vim /etc/mysql/my.cnf
Add:
[mysqld]
Skip-Grant-Tables
After saving the restart mysql, it can be a normal landing.
Restart method:
Console input /etc/init.d/mysqld restart