1. redhat6 网卡配置
打开系统发现系统默认auto eth0 ,自己配的system eth0 没有启用,把auto eth0删除后重启network服务,报错没找到设备。
用ifconfig 查看发现,启动的还是auto eth0。
编辑文件/etc/udev/rules.d/70-persistent-net.rules
最终发现是 因为 mac addr 配的不对导致网卡启动不了。
2. 用winscp 把文件传到服务器上
apr-1.6.2.tar.gz
apr-util-1.5.4.tar.gz
httpd-2.4.27.tar.gz
pcre-8.41.tar.gz
mysql-community-common-5.7.19-1.el6.x86_64.rpm
mysql-community-libs-5.7.19-1.el6.x86_64.rpm
mysql-community-client-5.7.19-1.el6.x86_64.rpm
mysql-community-server-5.7.19-1.el6.x86_64.rpm
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
php-5.6.31.tar.gz
yum-3.2.29-81.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
yum-plugin-remove-with-leaves-1.1.30-40.el6.noarch.rpm
yum-plugin-upgrade-helper-1.1.30-40.el6.noarch.rpm
yum-plugin-versionlock-1.1.30-40.el6.noarch.rpm
3. 第一步安装mysql5.7.19
rpm -qa | grep -i mysql
显示已安装 mysql-libs-5.1.66-2.el6_3.x86_64
卸载之:yum -y remove mysql-libs*
必须按如下次序安装,否则会报库依赖错误,导致安装失败。
Rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.19-1.el6.x86_64.rpm
Rpm -ivh mysql-community-client-5.7.19-1.el6.x86_64.rpm
Rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm
3.1默认安装目录如下。
数据库目录:/var/lib/mysql/
配置文件:/etc/my.cnf
/usr/share/mysql(mysql.server命令及配置文件)
相关命令:/usr/bin(mysqladmin mysqldump等命令)
启动脚本:/etc/rc.d/init.d/(启动脚本文件mysql的目录)
3.2 启动后查看日志发现的错误
日志路径:/var/log/mysqld.log
3.2.1 Can't open the mysql.plugin table. Please run mysql_upgrade to create it
先修改一下my.cnf 添加一行(注意,虽然太长,但不要回车换行,可能会出问题):
【sql_mode=ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,ANSI_QUOTES】
然后执行数据库初始化:mysqld --initialize --console
看错误日志/var/log/mysqld.log可以发现生成了root密码
【2017-11-21T03:14:17.477653Z 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: 0f306bea-ce6a-11e7-8f6d-000c29a0ec02.
2017-11-21T03:14:17.593778Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-11-21T03:14:17.594715Z 1 [Note] A temporary password is generated for root@localhost: >-T4W60v-TW2】
执行启动代码:mysqld_safe --user=root --skip-grant-tables --skip-networking &