sqladmin -u用户名 -p旧密码 password 新密码
如:sqladmin -uroot -proot password rootroot
有个警告:Warning: Using a password on the command line interface can be insecure.
翻译:警告:在命令行界面上使用密码可能是不安全的。
这个时候警告和改密码无关,是已经改成功了
用新密码登录就可以了
更多方式
参考文章链接:https://www.cnblogs.com/qianzf/p/7089197.html