-
启动网卡
-
验证网络管理器和网卡接口状态
# systemctl status NetworkManager.service
# nmcli dev status
-
修改网卡配置文件
通过上一步可以看到有两个网卡设备,eno16777984和lo,在/etc/sysconfig/network-scripts中查找以eno16777984结尾的文件,得到ifcfg-eno16777984文件。
# vi ifcfg-eno16777984
# :x
保存退出
-
启动网络,激活网卡
# /etc/init.d/network start /启动网卡
# ifup etho /激活网卡
# nmcli device status /查看网络连接状态
-
-
拷贝rpm到服务器
Winscp,从本地Windows机器拷贝rpm到远程服务器,包括mysql和net-tools
-
安装mysql
# rpm –ivh net-tools.rpm
# rpm –ivh mysql.rpm
Mysql中的lib与mariadb中的lib冲突,而postfix依赖于mariadb中的mysql-client,卸载postfix与mariadb-libs
# rpm –e postfix.rpm
# rpm –e mariadb-libs.rpm
# rpm –ivh mysql.rpm mysql-client.rpm
-
首次登陆mysql,并设置mysql为任意位置可访问
# service mysql start
# mysql –u root –p (回车后输入密码,建议从.mysql_secret文件中拷贝,手打的容易出错)
Mysql> set password = password("123456")
Mysql> exit;
# mysql –u root –p (回车后输入新密码123456)
Mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
Mysql> flush privileges;
# systemctl start firewalld.service /启动firewall
# systemctl stop firewalld.service /停止firewall
# systemctl disable firewalld.service /禁止firewall开机启动
# firewall-cmd --zone=public –add-port=3306/tcp –permanent /开启3306端口
# firewall-cmd –reload /重新载入以生效
-
使用navicat远程登陆mysql