「Raspbian StretchにMariaDB」の版間の差分
ナビゲーションに移動
検索に移動
編集の要約なし |
編集の要約なし |
||
| (同じ利用者による、間の2版が非表示) | |||
| 1行目: | 1行目: | ||
=== インストール === | === インストール === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ sudo apt | $ sudo apt install -y mariadb-server | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 45行目: | 45行目: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ sudo mysql -u root -p<PASSWORD> | $ sudo mysql -u root -p<PASSWORD> | ||
</syntaxhighlight> | |||
=== アンインストール === | |||
<syntaxhighlight lang="bash"> | |||
$ sudo apt purge -y mariadb* | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:MariaDB]] | [[Category:MariaDB]] | ||
[[Category:RaspBerryPi]] | |||
[[Category:Raspbian]] | [[Category:Raspbian]] | ||
[[Category:Stretch]] | [[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*