mysql安装之rpm方式安装的详细步骤
本篇文章给大家带来的内容是关于mysql安装之rpm方式安装的详细步骤,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
查看安装以及卸载# 查看rpm -qa | grep mysql# 卸载yum -y remove mysql-libs-5.1.66-2.el6_3.x86_641.centos7需要先卸载mariadb查看命令rpm -qa | grep mariadb
安装包资源地址
mysql下载地址# 下载资源名称mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar解压资源tar -xvf mysql-5.7.22-1.el7.x86_64.rpm-bundle.tar获取rpm包mysql-community-common-5.7.19-1.el6.x86_64.rpmmysql-community-client-5.7.19-1.el6.x86_64.rpmmysql-community-server-5.7.19-1.el6.x86_64.rpmmysql-community-libs-5.7.19-1.el6.x86_64.rpm安装# 安装顺序# common --> libs --> clients --> server# 安装命令rpm -ivh 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可能需要依赖包libaio安装命令yum -y install libaio初始化mysqld --initialize --user=mysql启动service mysqld start登录# 查看初始密码cat /var/logs/mysql.log#或者grep 'password' /var/logs/mysql.log -n -B 5# 登陆mysql -uroot -p'123456'# 修改初始密码set PASSWORD=PASSWORD('密码');授权远程链接### 授权192.168.0.1可以远程链接*[所有数据库].*[所有表] 账号:root 密码123456grant all privileges on *.* to 'root'@'192.168.0.1' identified by '123456';### 授权所有ipgrant all privileges on *.* to 'root'@'%' identified by '123456';### 以上*.*表示[数据库].[表]### 使授权立刻生效flush privileges;以上就是mysql安装之rpm方式安装的详细步骤的详细内容,更多请关注小潘博客其它相关文章!