centos7 4下yum方式安裝mysql8 0

2021-08-23 14:15:36 字數 1166 閱讀 3263

wget
安裝

rpm -uvh mysql80-community-release-el7-1.noarch.rpm 

yum install -y mysql-community-server

開啟服務

service mysqld start
找到初始密碼

grep 'temporary password' /var/log/mysqld.log

2018-08-15t06:13:14.412800z 5 [note] [my-010454] [server] a temporary password is generated for root@localhost: hhnlwotu/01q

最後面這個字串就是初始密碼

mysql -uroot -p
輸入上面那個初始密碼

修改密碼,這裡注意一下,密碼強度是有要求的,這也是mysql8的特性

mysql>alter user 'root'@'localhost' identified by 'mynewpass4!';

mysql>use mysql;

修改登入ip限制,不修改就只能本地登入

mysql>update user set host = '%' where user = 'root';
重新重新整理一下,因為有的時候用遠端工具連線會有問題

mysql>alter user 'root'@'%' identified by 'mynewpass4!' password expire never;

mysql>alter user 'root'@'%' identified with mysql_native_password by 'mynewpass4!';

好了,用資料庫的遠端工具連線上可以用了

資料目錄:/usr/lib/mysql

配置檔案:/etc/my.cnf

日誌:/var/log/mysqld.log

pid檔案:/var/run/mysqld

sock:/var/lib/mysql/mysql.sock

Centos7 4下安裝Nvidia驅動

一 環境資訊 1 作業系統 centos linux release 7.4 core 2 顯示卡 nvidia gtx1060 6g 二 具體安裝步驟 linux系統一般預設安裝的是開源的nouvea顯示卡驅動,它與nvidia顯示卡官方驅動會產生衝突,所以要安裝nvidia官方驅動必須先禁止no...

在CentOS7 4下Docker安裝nginx

在官網搜尋nginx映象說明文件 在官網搜尋nginx使用文件 nginx主配置檔案 設定執行的使用者 user root 設定nginx要開啟的子程序數量,一般設定為和cpu數量相等值 work processes 1 設定全域性錯誤日誌位置和級別 error log var log nignx ...

EOS編譯(環境Centos7 4)

首先從github上拉eos的原始碼 git clone recursive如果沒加 recursive,則拉完原始碼後需要在原始碼目錄執行以下命令 如果沒有執行,執行編譯命令時會提示 git submodule update init recursive執行編譯命令 sh eosio build....