freebsd:freebsd_11_install_mariadb_10.3

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
freebsd:freebsd_11_install_mariadb_10.3 [2018-10-24 00:25]
Decomo
freebsd:freebsd_11_install_mariadb_10.3 [2021-04-26 13:23] (現在)
Decomo [my.cnfのサンプルがない?]
行 64: 行 64:
  
 ==== my.cnfのサンプルがない? ==== ==== my.cnfのサンプルがない? ====
 +
 +<note>** (2021-04-26 追記) **
 +
 +MariaDB 10.4から設定ファイルの置き場が変わり、ファイル名もmy.cnfからserver.cnf/client.cnfへと変わった。本記事を参考にする場合は注意のこと。
 +</note>
  
 portsから入れると、my.cnfやお馴染のサンプルファイルmy-medium.cnfやmy-default.cnfなどは一切インストールされないようだ。[[https://mariadb.com/kb/en/library/configuring-mariadb-with-mycnf/|MariaDBの公式サイト]]によれば「If no my.cnf file is found, the default values are used for all variables.」とのことなので、my.cnfがなくても特に問題はなさそうだ。 portsから入れると、my.cnfやお馴染のサンプルファイルmy-medium.cnfやmy-default.cnfなどは一切インストールされないようだ。[[https://mariadb.com/kb/en/library/configuring-mariadb-with-mycnf/|MariaDBの公式サイト]]によれば「If no my.cnf file is found, the default values are used for all variables.」とのことなので、my.cnfがなくても特に問題はなさそうだ。
行 83: 行 88:
 </code> </code>
  
 +ご丁寧にインストール時に「MariaDBはhier(7)を尊重して/etc/my.cnf, /etc/mysql/my.cnfは見に行かないよ(意訳」とまで言ってくれる。
 +<code>
 +MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
 +my.cnf. Please move existing my.cnf files from those paths to
 +/usr/local/etc and /usr/local/etc/mysql.
 +</code>
 ==== my.cnfの作成 ==== ==== my.cnfの作成 ====
  
行 285: 行 296:
 +--------------------------+----------------------------------+ +--------------------------+----------------------------------+
 8 rows in set (0.001 sec) 8 rows in set (0.001 sec)
 +</code>
 +
 +==== ユーザーの追加 ====
 +
 +<code>
 +create user ユーザー名@localhost identified by パスワード;
 +</code>
 +
 +==== DBと権限の追加 ====
 +
 +DBの作成
 +<code>
 +create database データベース名
 +</code>
 +
 +指定DBの全権限をユーザーに追加
 +<code>
 +grant all on データベース名.* to ユーザー名@localhost identified by パスワード;
 </code> </code>
  
  • freebsd/freebsd_11_install_mariadb_10.3.1540308344.txt.gz
  • 最終更新: 2018-10-24 00:25
  • by Decomo