RPM安装MYSQL5.7

RPM安装MYSQL5.7

1:YUM安装依赖库

yum install perl libaio numactl

2:下载安装需要的RPM包

https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.21-1.el6.x86_64.rpm
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-common-5.7.21-1.el6.x86_64.rpm
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-client-5.7.21-1.el6.x86_64.rpm
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-libs-5.7.21-1.el6.x86_64.rpm

3:安装RPM

rpm -ivh mysql-community-*.rpm

4:启动服务器

service mysqld start

5:在日志里查看启动的密码

cat /var/log/mysqld.log |grep password

6:登录MYSQL并创建新的特权账号

mysql -uroot -p
SET password=password('包含大小写数字符号的密码');
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY '包含大小写数字符号的密码' WITH GRANT OPTION;

以上安装步骤结束

附送SQL导入语句

mysql --default-character-set=utf8 -uvideopatrol -p videopatrol<videopatrol.sql

输入密码即可开始导入数据

上一篇:在ArchLinux中安装MySQL


下一篇:关于.NET中迭代器的实现以及集合扩展方法的理解