阿里雲centos7 安裝mysql

2021-09-03 02:59:09 字數 1067 閱讀 6376

wget 

sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

安裝

yum install mysql-server

yum install mysql-devel

yum install mysql

rpm -qa | grep -i mysql

啟動mysql

service mysqld start
設定開機啟動

systemctl enable mysqld
開啟檔案my.cnf,位置在etc/my.cnf

在my.cnf中的[mysqld]之後插入skip-grant-tables

重啟mysql服務

service mysqld restart
輸入

mysql -u rooot -p
直接登入,密碼是空

修改密碼操作

mysql> use mysql;

mysql> show tables;

select user,authentication_string from user;

update mysql.user set authentication_string=password('123456') where user='root';

flush privileges;

exit

'123456』即新密碼

刪掉my.cnf中的skip-grant-tables

重啟服務

service mysqld restart

阿里雲 Centos7 安裝zookeeper

1 建立 usr local zookeeper 資料夾 shell mkdir p usr local zookeeper2 進入到 usr local zookeeper 目錄中 shell wget htps 4 解壓縮 zookeeper 3.5.4 beta.tar.gz shell ta...

阿里雲centos7 安裝vsftpd

vsftpd相關問題 安裝yum y install vsftpd設定開機啟動 systemctl enable vsftpd啟動ftp服務 systemctl start vsftpd.serviceuseradd g root d home wwwroot asite s sbin nologi...

阿里雲centos7安裝mysql

使用root登入 1.確保伺服器系統處於最新狀態 root localhost yum y update如果顯示以下內容說明已經更新完成 replaced grub2.x86 64 1 2.02 0.64.el7.centos grub2 tools.x86 64 1 2.02 0.64.el7.c...