檢視是否還有mysql軟體
rpm -qa | grep mysql
# 解除安裝mysql相關依賴
yum remove mysql mysql-server mysql-libs mysql-server;
將找到的相關東西delete掉
find / -name mysql
rm /etc/my.cnf
rm -rf /usr/lib/mysql
rm -rf /usr/share/mysql
通過以上幾步,mysql應該已經完全解除安裝乾淨了.
shell> wget
# 安裝mysql源
shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
# 檢查mysql源是否安裝成功
yum repolist enabled | grep "mysql.*-community.*" 安裝
yum install -y mysql mysql-server mysql-libs mysql-server
啟動
systemctl start mysqld.service
systemctl status mysqld.service
# 配置檔案
vim /etc/my.cnf
# mysqld下增加如下內容
skip-grant-tables
character_set_server=utf8
init_connect='set names utf8'
# 重啟mysql服務
systemctl start mysqld.service
配置mysql
# 設定乙個密碼
update mysql.user set authentication_string=password('123abcabc.') where user='root';
flush privileges;
grant all privileges on *.* to 'root'@'%' identified by '123abcabc.' with grant option
flush privileges;
CentOS mysql安裝以及使用
前言 如何檢視linux伺服器的各個狀態?版本查詢 123 4567 89 lsb release a lsb version core 4.1 amd64 core 4.1 noarch distributor id centos description centos linux release ...
centos mysql 安裝以及遠端登入的開啟
configure make make install bison cmake make bzr2.開始搞mysql 解壓mysql 5.5.25.tar.gz tar zxvf mysql 5.5.25.tar.gz cd mysql 5.5.25 cmake dcmake install pre...
centos mysql安裝與解除安裝
解壓重新命名 tar zxvf mysql 5.7.25 linux glibc2.12 x86 64.tar.gz c usr local mv usr local mysql 5.7.25 linux glibc2.12 x86 64 usr local mysql 建立data目錄 mkdir...