0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

webarenaでubuntu その70

0
Last updated at Posted at 2026-11-02

概要

webarenaでubuntu18.04やってみた。
vpsクラウドが終了するらしい。
vpsクラウドからindigoに引っ越す検討。
indigo申し込んでみた。
mysql-serverのセットアップ。

mysql_secure_installationの実行

mysql_secure_installationは、MySQLのインストール後にセキュリティを強化するための対話型初期設定スクリプトです。

実行方法

ターミナルで以下のコマンドを実行します。

sudo mysql_secure_installation

主な設定項目(質問内容)

スクリプト実行後は、セキュリティ向上のための各質問に Y(はい)または N(いいえ)で答えていきます。主な項目には以下が含まれます。

  • VALIDATE PASSWORD プラグイン:
    パスワード強度チェッカーの設定
  • root パスワード:
    管理者パスワードの設定・変更
  • 匿名ユーザーの削除:
    セキュリティ上のリスクとなる匿名アカウントの削除(推奨:Y)
  • リモート root ログインの禁止:
    外部からの root 接続制限(推奨:Y)
  • テスト用データベースの削除:
    初期テストDBの削除
  • 権限テーブルのリロード:
    変更の即時反映
$ sudo mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:

The existing password for the user account root has expired. Please set a new password.

New password:
Re-enter new password:
The 'validate_password' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : n
... skipping.

By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n -> y
... skipping.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!


以上。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?