CentOS系統使用yum安裝MariaDB資料庫

來源:互聯網
上載者:User

CentOS系統使用yum安裝MariaDB資料庫

因為在CentOS上預設是沒有MariaDB倉庫的,因此,先需要安裝rep

step 1. 產生repo檔案
    (1) 建立一個新的repo檔案
          # nano /etc/yum.repos.d/MariaDB.repo
    (2) 新增內容
          [mariadb]
         name = MariaDB
         baseurl = http://yum.mariadb.org/5.5/centos6-amd64
         gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
         gpgcheck=1
    (3) Ctrl+O,Ctrl+X 儲存退出

step 2. 更新倉庫
# yum -y update

step 3. 安裝MariaDB
yum -y install MariaDB-client MariaDB-server MariaDB-devel

step 4. 啟動MariaDB
service mysql start
:)OK,安裝成功,收工做午飯咯。。。
補充:就想到吃了。。。還要把大小寫敏感去掉啊大姐(linux下預設表名是大小寫敏感的,這樣使用起來很不方便)。。。

step 5. 去掉表名的大小寫敏感
cp /etc/my.cnf.d/server.cnf  /etc/my.cnf
在 [mysqld-5.5] 下加入:
lower_case_table_names=1
這樣系統就會自動將表名轉成小寫。切記在使用資料庫前作這個操作,否則中途改就比較鬱悶了,特別是當資料庫名也有大寫字母的時候。

在 CentOS/RHEL/Scientific Linux 6 下安裝 LAMP (Apache with MariaDB and PHP)

MariaDB Proxy讀寫分離的實現

安裝MariaDB與MySQL並存

MariaDB 的詳細介紹:請點這裡
MariaDB 的:請點這裡

相關文章

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.