Centos6.5在线安装mysql 8.0的顺序如下,希望大家可以顺利进行安装。
Mysql卸载从下往上顺序
1
2
3
4
5
6
|
[root@localhost /] # rpm -e --nodeps qt-MySQL-4.6.2-26.el6_4.x86_64 [root@localhost /] # rpm -e --nodeps mysql-server-5.1.71-1.el6.x86_64 [root@localhost /] # rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64 [root@localhost /] # rpm -e --nodeps mysql-devel-5.1.71-1.el6.x86_64 [root@localhost /] # rpm -e --nodeps mysql-5.1.71-1.el6.x86_64 [root@localhost /] # rpm -qa | grep mysql |
添加在线Mysql源
1
2
3
4
5
6
7
8
9
10
11
|
cd /etc/yum .repos.d/ vi mysql.repo # Enable to use MySQL 8.0 [mysql80-community] name=MySQL 8.0 Community Server baseurl=http: //repo .mysql.com /yum/mysql-8 .0-community /el/6/ $basearch/ enabled=1 gpgcheck=1 gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
验证正确的subrepositories已启用和禁用通过运行以下命令来检查它的输出(DNF启用系统,取代百胜在DNF的命令)
1
|
yum repolist enabled | grep mysql |
YUM安装mysql
复制代码 代码如下:
yum install -y mysql-community-common mysql-community-libs mysql-community-client mysql-community-server mysql-community-devel
启动Mysql服务
1
|
service mysqld start |
查看MySQL服务器的状态
1
|
service mysqld status |
设置开机启动
1
|
chkconfig mysqld on |
生成随机密码
1
|
grep 'temporary password' /var/log/mysqld.log |
重新登陆
1
2
|
mysql -uroot -p b/xE8hdZoEwJ |
配置Mysql 密码以及权限
1
|
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'Report@123' ; |
允许root用户在任何地方进行远程登录,并具有所有库任何操作权限
[code]GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Report@123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。