1
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?

More than 3 years have passed since last update.

Bitnami Mantis のDBリストアについて

Last updated at Posted at 2021-01-13

##DBのリストア
テーブルがすでに存在するということで、怒られる

>mysql -u root -p bitnami_mantis < bitnami_mantis.sql
Enter password: ********
ERROR 1050 (42S01) at line 30: Table 'mantis_api_token_table' already exists

##DB再作成
DBへ接続、DROP、確認

>mysql -u root -pパスワード
mysql> drop database bitnami_mantis;
Query OK, 32 rows affected (0.36 sec)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.02 sec)
mysql> quit
Bye

##DB作成

mysql> create database bitnami_mantis;
Query OK, 1 row affected (0.01 sec)

mysql> quit
Bye

##DUMPをリストア

>mysql -u root -pパスワード -D bitnami_mantis < bitnami_mantis.sql
mysql: [Warning] Using a password on the command line interface can be insecure.

##参考)
データのみバックアップ

>mysqldump -u root -pパスワード -t bitnami_mantis > hogehoge.dump

リストア(なんかエラーが出る)

>mysql -u root -p bitnami_mantis < hogehoge.dump
Enter password: ********
ERROR 1062 (23000) at line 33: Duplicate entry '1' for key 'mantis_bug_file_table.PRIMARY'
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?