您好,登錄后才能下訂單哦!
wget wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo yum localinstall mysql80-community-release-el7-3.noarch.rpm
sudo yum install mysql-server -y
sudo systemctl start mysqld
sudo systemctl status mysqld
sudo systemctl enable mysqld
sudo grep 'temporary password' /var/log/mysqld.log
sudo mysql_secure_installation
mysqladmin -u root -p version
mysql -u root -p
創建庫
mysql>create database testdb;
創建用戶
mysql>create user test IDENTIFIED by 'zxc123';
授權給用戶
mysql>GRANT ALL PRIVILEGES ON testdb.* TO test@'%';
檢查用戶權限
mysql>use mysql;
mysql>select user,host from user;
更新權限
mysql>FLUSH PRIVILEGES;
退出
mysql>\q
sudo systemctl restart mysql
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。