LoginSignup
1
0

More than 3 years have passed since last update.

MariaDBをインストール(CentOS8)

Last updated at Posted at 2020-11-10

記事を読んで、「いいじゃね?」って思ったらLGTMお願いします。

前提条件

・dockerで構築したCentOSでMariaDBをインストールする
・CentOSのバージョンは以下

$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

MariaDBをインストールする

リポジトリを追加する

$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
$ chmod +x mariadb_repo_setup
$ ./mariadb_repo_setup

インストールする

$ yum install MariaDB-server MariaDB-client

インストール出来たか確認する

$ mariadb --version
mariadb  Ver 15.1 Distrib 10.5.7-MariaDB, for Linux (x86_64) using readline 5.1

初期設定をする

初期設定スクリプトを実行する

$ /usr/bin/mysql_secure_installation

新しいパスワード設定以外はすべてEnterを押す
以下のように新しいパスワード設定では新しいパスワードを設定する

New password:
Re-enter new password:

その後のすべてEnterを押す

ログインする

以下のコマンドでログインする
ログイン時にパスワードを聞かれるので、設定したパスワードを入力する

$ mariadb -u root -p
1
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
1
0