#mysql-server mysql-client 下載 # http://dev.mysql.com/downloads/mysql/ #安裝之前應該先查詢系統是否自在了mysql的軟件包 rpm -qa|grep -i mysql #如果有的話需要先刪除 rpm -e 軟件名 --nodeps rpm -ivh MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm rpm -ivhMySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm #安裝後生成的一個隨機密碼在 /root/.mysql_secret #啓動 MySQL service mysql start #登錄mysql mysql -u root -p #修改密碼 SET PASSWORD=password('password'); #添加一個可遠程登錄的帳號 GRANT all privileges on *.* TO 'root'@'%' identified by 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; #修改密碼 SET PASSWORD FOR 'root'@'%' = PASSWORD('password'); ######################################### #可運行此腳本 進行生產服務器安全配置 /usr/bin/mysql_secure_installation #Enter current password for root 輸入root密碼 #Change the root password? 是否修改root的密碼 #Remove anonymous users? 是否刪除匿名賬號 #Disallow root login remotely? 是否取消root用戶遠程登錄 #Remove test database and access to it? 是否刪除test庫和對test庫的訪問權限 #Reload privilege tables now? 是否現在刷新授權表使修改生效
CentOS RPM安裝 MySQL-5.6.17
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.