全新安装后无法像其他旧 MySQL 版本那样使用 root ID 和空/无密码登录到 MySQL 数据库
Cannot login to MySQL database after fresh install with root ID and empty/no password like other older MySQL versions do
在linux上全新安装MySQL-community-server 5.7后,需要从/var/log/mysqld.log中找到临时密码才能登录作为根.
After you installed MySQL-community-server 5.7 from fresh on linux, you will need to find the temporary password from /var/log/mysqld.log to login as root.
grep '临时密码'/var/log/mysqld.log
运行mysql_secure_installation
修改新密码
参考:http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html