1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Redmine インストール

Posted at

rootユーザーのパスワード変更・匿名ユーザー削除ほかセキュリティ向上

MySQLのセキュリティ向上のために、初期設定ツール mysql_secure_installation を実行してrootパスワードの設定や不要なユーザー・データベースの削除を行います。

mysql_secure_installation
:
(中略)
:
Enter current password for root (enter for none): (そのままEnterキーを押す)
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password: (MySQLのrootユーザーに新たに設定するパスワードを入力)
Re-enter new password: (新パスワードを再入力)
Password updated successfully!
Reloading privilege tables..
... Success!
:
(中略)
:
Remove anonymous users? [Y/n] y (匿名ユーザーを削除)
... Success!
:
(中略)
:
Disallow root login remotely? [Y/n] y (rootユーザーの接続元をlocalhostに限定)
... Success!
:
(中略)
:
Remove test database and access to it? [Y/n] y (testデータベースを削除)

  • Dropping test database...
    ... Success!
  • Removing privileges on test database...
    ... Success!
    :
    (中略)
    :
    Reload privilege tables now? [Y/n] y (これまでの変更を直ちに適用)
    ... Success!
    MySQLのrootユーザーに設定した新パスワードは、今後MySQLにrootで接続してデータベースの管理操作を行うときに入力を求められます。

Redmine用データベースとユーザーの作成

mysql -uroot -p
mysql> create database db_redmine default character set utf8;
mysql> grant all on db_redmine.* to user_redmine@localhost identified by '********';
mysql> flush privileges;
mysql> exit;
※ ******** の部分は任意のパスワードを設定してください。このパスワードは後述のdatabase.ymlの設定で使用します。

root

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?