mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
这应该是设置密码时没有加密造成的,可以用以下方法解决
[root@host50 ~]# vim /etc/my.cnf
添加这一行
skip-grant-tables
重启数据库
[root@host50 ~]# systemctl restart mysqld
[root@host50 ~]# mysql