-
卸载Linux自带的mysql组件(必须做)
yum remove mysql mysql-server mysql-libs compat-mysql151 –y -
下载软件包
MySQL-client-5.5.62-1.el7.x86_64.rpm
MySQL-devel-5.5.62-1.el7.x86_64.rpm
MySQL-server-5.5.62-1.el7.x86_64.rpm
MySQL-shared-5.5.62-1.el7.x86_64.rpm -
注意安装顺序
rpm -ivh MySQL-devel-5.5.62-1.el7.x86_64.rpm
rpm -ivh MySQL-shared-5.5.62-1.el7.x86_64.rpm
rpm -ivh MySQL-client-5.5.62-1.el7.x86_64.rpm
安装依赖
yum install perl
yum -y install autoconf
rpm -ivh MySQL-server-5.5.62-1.el7.x86_64.rpm -
把/usr/share/mysql中的my-huge.cnf复制到/etc下,并重命名成my.cnf
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf -
启动mysql服务
systemctl start mysql -
进入mysql
//选择系统数据库
use mysql;//use 数据库名称
//设置密码
update user set password=password(‘123456’) where user=‘root’;
//退出mysql
exit;
重启服务
systemctl restart mysql
//登录验证
mysql -u root –p
//展示当前所有数据库实例
show databases;
-
设置其他机器可以远程访问mysql
-
1.进入mysql 授权
2.授权
grant all privileges on . to ‘root’ @’%’ identified by ‘123456’ with grant option;3.写入权限 flush privileges; 重启服务器 systemctl restart mysql 尝试使用navicat连接
flush privileges;
4.重启服务器
systemctl restart mysql
尝试使用navicat连接
Linx-MySql配置步骤
最新推荐文章于 2022-02-28 19:15:05 发布