ubuntu16安裝mysql

先更新源 sudo apt-get update;

sudo apt-get install mysql-server 會提示輸入密碼;

sudo apt-get install mysql-client;

進入到/etc/mysql/mysql.conf.d 編輯mysqld.cnf,將bind_address改爲0.0.0.0

進入到mysql mysql -u root -p

允許root用戶遠程鏈接到mysql:grant all privileges on . to root@’%’ identified by ‘password’ with grant option;

flush privileges;

重啓mysql:sudo /etc/init.d/mysql restart

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章