「Raspbian StretchにMariaDB」の版間の差分
ナビゲーションに移動
検索に移動
ページの作成:「=== インストール === <syntaxhighlight lang="bash"> $ sudo apt-get install -y mariadb-server </syntaxhighlight> === 初期設定 === <syntaxhighlight lang="bash"> $...」 |
編集の要約なし |
||
| (同じ利用者による、間の3版が非表示) | |||
| 1行目: | 1行目: | ||
=== インストール === | === インストール === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ sudo apt | $ sudo apt install -y mariadb-server | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 46行目: | 46行目: | ||
$ sudo mysql -u root -p<PASSWORD> | $ sudo mysql -u root -p<PASSWORD> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== アンインストール === | |||
<syntaxhighlight lang="bash"> | |||
$ sudo apt purge -y mariadb* | |||
</syntaxhighlight> | |||
[[Category:MariaDB]] | |||
[[Category:RaspBerryPi]] | |||
[[Category:Raspbian]] | |||
[[Category:Stretch]] | |||
2018年8月23日 (木) 07:40時点における最新版
インストール
$ sudo apt install -y mariadb-server
初期設定
$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
以下のように修正
111行目 character-set-server = utf8 112行目 collation-server=utf8_general_ci
再起動
$ sudo systemctl restart mariadb
セキュリティ設定
$ sudo mysql_secure_installation
... Enter current password for root (enter for none): → <PASSWORD> or Enter ... Change the root password? [Y/n] → Y ... Remove anonymous users? [Y/n] → Y ... Disallow root login remotely? [Y/n] → Y ... Remove test database and access to it? [Y/n] → Y ... Reload privilege tables now? [Y/n] → Y ...
動作確認
$ sudo mysql -u root -p<PASSWORD>
アンインストール
$ sudo apt purge -y mariadb*