#author("2018-01-20T17:06:34+09:00","","")
#freeze
#author("2018-01-26T11:47:49+09:00","","")
#norelated
#contents
----
**インストール [#ce90833c]

# yum -y install mariadb-server mariadb-devel
#ref(./yum-mariadb.txt)

#region("ログ")
 完了しました!
#endregion

**サービス起動 [#c9c63d82]
# systemctl start mariadb
# systemctl start mariadb.service

**サービス自動起動 [#u719092c]
# systemctl enable mariadb
# systemctl enable mariadb.service

----

**設定ファイル [#a64236c1]
/etc/my.cnf
''/etc/my.cnf''

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
&br;datadir=/var/lib/mysql
&br;socket=/var/lib/mysql/mysql.sock
&br;# Disabling symbolic-links is recommended to prevent assorted security risks
&br;symbolic-links=0
&br;# Settings user and group are ignored when systemd is used.
&br;# If you need to run mysqld under a different user or group,
&br;# customize your systemd unit file for mariadb according to the
&br;# instructions in http://fedoraproject.org/wiki/Systemd
&br;
&br;&color(red){character-set-server=utf8};
&br;
&br;[mysqld_safe]
&br;log-error=/var/log/mariadb/mariadb.log
&br;pid-file=/var/run/mariadb/mariadb.pid
&br;
&br;#
&br;# include all files from the config directory
&br;#
&br;!includedir /etc/my.cnf.d
&br;
&br;&color(red){[mysql]};
&br;&color(red){default-character-set=utf8};

&color(red){character-set-server=utf8};
----

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
**rootパスワード設定 [#wcdccb6f]
# /usr/bin/mysqladmin -u root password 'PASSWORD'

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
----

color(red){[mysql]};
color(red){default-character-set=utf8};
**DB接続 [#s9498c86]
# mysql -uroot -p

**datebase作成 [#ge853e48]
~> create database ''DATABASE'' default character set utf8;

**権限設定 [#v5c90806]
~> grant all on ''DATABASE''.* to ''USERNAME''@localhost identified by 'PASSWORD';


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS