Wednesday, July 29, 2015

MariaDB

  1. 2015.07.24
    1. Installing MariaDB 10 with YUM
      1. vim /etc/yum.repos.d/MariaDB.repo
        1. # MariaDB 10.0 CentOS repository list - created 2015-07-24 02:31 UTC 
        2. http://mariadb.org/mariadb/repositories/
        3. [mariadb] 
        4. name = MariaDB 
        5. baseurl = http://yum.mariadb.org/10.0/centos6-amd64
        6. gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
        7. gpgcheck=1
      2. yum -y install MariaDB-server MariaDB-client
      3. /etc/init.d/mysql start
  2. 2015.03.13
    1. installation
      1. groupadd mysql 
      2. useradd -g mysql mysql 
      3. cd /usr/local 
      4. download binary tarball from https://downloads.mariadb.org/
      5. tar -zxvpf /path-to/mariadb-VERSION-OS.tar.gz 
      6. ln -s mariadb-VERSION-OS mysql 
      7. cd mysql 
      8. ./scripts/mysql_install_db --user=mysql 
        1. solution for the error
          1. libaio.so.1: cannot open shared object file
            1. yum -y install libaio
      9. chown -R root . 
      10. chown -R mysql data
      11. export PATH=$PATH:/usr/local/mysql/bin/
      12. cd support-files/ 
      13. cp mysql.server /etc/init.d/mysql 
      14. chmod +x /etc/init.d/mysql
      15. chkconfig --add mysql 
      16. chkconfig --level 345 mysql on
      17. service mysql start / stop
    2. management
      1. set root password
        1. mysql -u root
        2. use mysql;
        3. update user set password=PASSWORD("new-password") where User='root';
        4. flush privileges;
        5. exit;
      2. granting user connections from remote hosts
        1. GRANT ALL PRIVILEGES ON *.* TO 'root'@'remote host' IDENTIFIED BY 'password' WITH GRANT OPTION;
    3. reference
      1. https://mariadb.com/kb/en/mariadb/documentation/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.