Linux 下MySQL快速安裝和client訪問授權

來源:互聯網
上載者:User

Linux 下MySQL快速安裝和client訪問授權:

yum install mysql-server //安裝mysql服務端

/etc/init.d/mysqld start  //啟動mysql伺服器

---------------------------------client 訪問授權----------------------------------------------------

MYSQL中有一張user表 儲存了資料庫使用者資訊,其中有一列叫host,定義了可以訪問伺服器的用戶端ip

要讓所有用戶端都能訪問資料庫 需要執行如下:

備忘:所有用戶端都可以用root訪問資料庫,並保留初始密碼

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'  WITH GRANT OPTION;

備忘:所有用戶端都可以用root訪問資料庫,用admin作為密碼

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'admin' WITH GRANT OPTION;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.