个人比较喜欢 MySQL 的轻量,今天花了一点时间把云服务上的 MySQL5.7 换成了 Percona-Server ,Percona 是一个开源的 MySQL 衍生版。InnoDB的数据库引擎使得 Percona 服务器 非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。安装#安装 yum 源yum install测试 YUM 源是否生效yum list | grep percona#安装 Percona-Serveryum install Percona-Server-server-57 Percona-Server-client-57#启动服务service mysqld start#登录 MySQLmysql -u root -p
mysql5.7.x 安装完成后会初始化一个 root 用户的随机密码,在 /var/log/mysqld.log 日志中可以查看到,也可以通过命令查找
[root@iZ11fek1j6cZ lib]# grep ‘temporary password’ /var/log/mysqld.log2016-11-19T09:43:01.644617Z 1 [Note] A temporary password is generated for root@localhost: LibldhWL+9Fd#修改密码ALTER USER USER() IDENTIFIED BY ‘xxxxxxx’;#重启 MySQL 服务service mysql restart#安装配置[root@iZ11fek1j6cZ lib]# mysql_secure_installation
Securing the MySQL server deployment.
enter password for user root:The ‘validate_password’ plugin is installed on the server.The subsequent steps will run with the existing configurationof the plugin.Using existing password for root.
Estimated strength of the password: 100Change the password for root ? ((Press y|Y for Yes, any other key for No) : n

… skipping.By default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a Productionenvironment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.
Normally, root should only be allowed to connect from‘localhost’. This ensures that someone cannot guess atthe root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n
… skipping.By default, MySQL comes with a>
发表评论