使用二进制包安装MariaDB
生活随笔
收集整理的這篇文章主要介紹了
使用二进制包安装MariaDB
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
二進制包是官方已經針對相應平臺編譯好的包,只要解壓就可以使用,編譯選項都是官方經過測試的。
1、安裝
tar?xvf?mariadb-10.0.12-linux-x86_64.tar.gz??-C?/usr/local/ cd?/usr/local/ ln?-s?mariadb-10.0.12-linux-x86_64/?mysql cd?/usr/local/mysql chown?-R?mysql?. chgrp?-R?mysql?. cp?support-files/my-innodb-heavy-4G.cnf?/etc/my.cnf scripts/mysql_install_db?--user=mysql?--defaults-file=/etc/my.cnf??#看到兩個"OK"代表成功 chown?-R?root?. chown?-R?mysql?data cp?support-files/mysql.server?/etc/init.d/mysql chmod?+x?/etc/init.d/mysql chkconfig?--add?mysql chkconfig?--level?2345?mysql?on /etc/init.d/mysql?start2、設置環境變量
# vim /etc/profile.d/mysql.sh
PATH=/usr/local/mysql/bin:$PATH3、設置密碼、刪除匿名帳戶和test數據庫
update?mysql.user?set?password=password('admin@123')?where?user='root'; delete?from?mysql.user?where?user=''; drop?database?test;刪除任何用戶訪問test數據庫:默認任何用戶可以訪問test數據庫和test_開頭的數據庫
delete?from?mysql.db?where?db?like?'test%';刷新權限表:
flush?privileges;來自為知筆記(Wiz)
轉載于:https://my.oschina.net/anthonyyau/blog/284092
總結
以上是生活随笔為你收集整理的使用二进制包安装MariaDB的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spring定时器
- 下一篇: IDC:中国IT安全硬件、软件和服务全景