「Raspbian StretchにMariaDB」の版間の差分
		
		
		
		ナビゲーションに移動
		検索に移動
		
 ページの作成:「=== インストール === <syntaxhighlight lang="bash"> $ sudo apt-get install -y mariadb-server </syntaxhighlight>  === 初期設定 === <syntaxhighlight lang="bash"> $...」  | 
				編集の要約なし  | 
				||
| 46行目: | 46行目: | ||
$ sudo mysql -u root -p<PASSWORD>  | $ sudo mysql -u root -p<PASSWORD>  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
[[Category:MariaDB]]  | |||
[[Category:Raspbian]]  | |||
[[Category:Stretch]]  | |||
2017年12月16日 (土) 17:30時点における版
インストール
$ sudo apt-get 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>