CentOS6.5安装mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar
2017-06-16 11:11
751 查看
先去官网(https://dev.mysql.com/downloads/mysql/),在Select Operating System选择Red Hat Enterprise Linux / Oracle Linux,在Select OS Version选择Red Hat Enterprise Linux 6 / Oracle Linux 6 (x86, 64-bit),下载RPM Bundle
将下载的文件上传到服务器/usr/local下,接着执行如下命令
如下所示
接着执行如下命令
将下载的文件上传到服务器/usr/local下,接着执行如下命令
rpm -qa|grep mysql #查看mysql是否安装,如果已经安装需要卸载,如果是 yum -y remove mysql-libs-5.1.71-1.el6.x86_64 #卸载 cd /usr/local/ #指定目录 tar -xvf mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar #解压 rpm -ivh mysql-community-common-5.7.18-1.el6.x86_64.rpm rpm -ivh mysql-community-libs-5.7.18-1.el6.x86_64.rpm rpm -ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm yum install perl #安装server时需要的依赖包 yum install numactl #安装server时需要的依赖包 yum install libaio #安装时需要的依赖包 rpm -ivh mysql-community-server-5.7.18-1.el6.x86_64.rpm service mysqld start #启动mysqld服务 netstat -tlunp #查看服务所需端口 cat /var/log/mysqld.log | more #查看日志,找初始密码 cat /etc/issue #查看系统版本 getconf LONG_BIT #查看系统位数
如下所示
2017-06-16T04:48:19.788616Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-06-16T04:48:22.099994Z 0 [Warning] InnoDB: New log files created, LSN=45790 2017-06-16T04:48:22.332387Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2017-06-16T04:48:22.405922Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 068f9e70-524f-11e7-80fb-000c297c9986. 2017-06-16T04:48:22.409115Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2017-06-16T04:48:22.410417Z 1 [Note] A temporary password is generated for root@localhost: dee5h,lqSA>)
接着执行如下命令
mysql -uroot -pdee5h,lqSA>) alter user 'root'@'localhost' identified by 'Mysql@123456'; #设置root的密码为Mysql@123456 use mysql; update user set user.Host='%' where user.User='root'; flush privileges; exit; /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT #配置端口3306 /etc/rc.d/init.d/iptables save #保存配置 /etc/init.d/iptables restart #重启防火墙iptables
相关文章推荐
- CentOS6.5安装mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar
- 【待完成】CentOS6.5安装mysql-cluster-community-7.5.6-1.el6.x86_64.rpm-bundle.tar
- linux6.5安装MySQL-5.5.53-1.el6.x86_64.rpm-bundle.tar
- centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
- CentOS 7.2 安装mysql 5.7.18-*.rpm-bundle.tar
- Centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
- centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
- CentOS6.9安装mysql-5.7.18-1.el6.i686.rpm-bundle.tar
- centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
- linux 下安装mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
- Linux安装MySQL-5.6.24-1.linux_glibc2.5.x86_64.rpm-bundle.tar
- MySQL学习4_CentOS/Linux下的MySQL安装文件类型:rpm package,rpm bundle和Compressed TAR Archive有什么区别
- Ubuntu 16.04.2 LTS 安装 mysql-server_5.7.18-1ubuntu16.10_amd64.deb-bundle.tar
- Ubuntu 16.04.2 LTS 安装 mysql-server_5.7.18-1ubuntu16.10_amd64.deb-bundle.tar
- Percona MySQL 5.7 Linux通用二进制tar包安装(CentOS 6.5)
- Linux安装MySQL-5.6.24-1.linux_glibc2.5.x86_64.rpm-bundle.tar
- CentOS安装MySQL-server-5.6.13-1.el6.x86_64.rpm
- Centos 6.5 安装配置二进制格式 MySQL 5.7.18
- CentOS7.3 安装 MySQL5.7.18 RPM Bundle
- CentOS 6.5 i386 安装MySQL 5.7.18