3、安轉軟體源
sudo rpm -uvh platform-and-version-specific-package-name.rpm
例如
mysql5.7預設安裝之後root是有密碼的。
7.1 獲取mysql的臨時密碼
為了加強安全性,mysql5.7為root使用者隨機生成了乙個密碼,在error log中,關於error log的位置,如果安裝的是rpm包,則預設是/var/log/mysqld.log。只有啟動過一次mysql才可以檢視臨時密碼
這裡的密碼是
ydsgaxoq>2n!
7.2 登陸並修改密碼使用預設的密碼登陸
mysql -uroot -p
mysql>
select @@log_error;
error
1820 (hy000): you must reset your password
using alter user statement before executing
this statement.
mysql>
如果密碼設定太簡單出現以下的提示alter
user
'root'@'localhost'
identified
by'root123';
如何解決
error 1819 (hy000): your password does not satisfy the current policy requirements
呢? 這裡直接提供解決方案文末有詳細的說明必須修改兩個全域性引數:
首先,修改validate_password_policy引數的值
再修改密碼的長度mysql> set
global validate_password_policy=0;
再次執行修改密碼就可以了set
global validate_password_length=1;
alter
user
'root'@'localhost'
identified
by'root123';
error 1819 (hy000): your password does not satisfy the current policy requirementsgrant all
privileges
on *.*
to'root'@
'%'identified
by'mypassword'
with
grant
option;
flush
privileges;
原文:
Centos7離線安裝mysql5
2.將部署包存放到 opt 資料夾下 3.解壓並安裝 cd opt mkdir mysql tar xvf opt mysql 5.7.30 1.el7.x86 64.rpm bundle.tar c opt mysql cd opt mysql rpm uvh rpm nodeps force1....
Centos7使用yum安裝Mysql5 7
centos7的yum源中預設是沒有mysql,因為現在已經用mariadb代替mysql了。安裝mysql rpm包 rpm ivh mysql57 community release el7 11.noarch.rpm 安裝mysql yum install mysql community se...
Centos 7 使用yum安裝mysql 5 7
wget 2 安裝mysql yum y install mysql57 community release el7 10.noarch.rpm yum y install mysql community server 3 啟動mysql systemctl start mysqld.service...