[[MariaDB]]

*CentOS7 [#n4a7e070]
***パッケージのインストールと自動起動設定 [#t7461688]
 # yum install mariadb mariadb-server
 # systemctl list-unit-files
 # systemctl enable mariadb.service

*CentOS6 [#r043e20b]
 # yum clean all
 # rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 # vi /etc/yum.repos.d/mariadb.repo
 [mariadb]
 name = MariaDB
 baseurl = http://yum.mariadb.org/10.1/centos6-x86/    <-- 32bit の場合はこちらを記述
 baseurl = http://yum.mariadb.org/10.1/centos6-amd64/    <-- 64bit の場合はこちらを記述
 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 gpgcheck=1
 enabled=1
 # yum --nodeps remove mysql-libs    <--依存関係でエラーになるので、事前に削除
 # yum --enablerepo=mariadb install MariaDB-devel MariaDB-client MariaDB-server
 # chkconfig --list mysql

*共通初期設定 [#x142e9d4]
*** rootのパスワード設定 [#x880d682]
 MariaDB [(none)]> set password for root@localhost=password('mariadbログインパスワード');
*** テストデータベースの削除 [#y207051b]
 MariaDB [(none)]> drop database test;
*** 空パスワードユーザーの削除 [#b5251c0f]
 MariaDB [(none)]> use mysql;
 MariaDB [(none)]> select user,password from user where password = '';
 MariaDB [(none)]> delete from user where password = '';

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS