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?

【ローカル環境構築】mysqli_sql_exception: Table '$テーブル名' doesn't exist の解決方法

0
Last updated at Posted at 2026-08-05

発生したエラー

CodeIgniter起動時に以下のエラーが発生しました。

Table '$テーブル名' doesn't exist

原因

CodeIgniterで利用している必要なテーブルが、
ローカルDB内に存在していませんでした。

本番環境のdumpファイルをローカル環境へインポートしましたが、
アプリケーションが利用するテーブルが不足していたことが原因でした。

調査内容

DB内のテーブル一覧を確認しました。

SHOW TABLES;

確認した結果、テーブルが存在していないことを確認しました。

解決方法

不足していた テーブルを作成しました。

作成後、正常にアクセスできることを確認しました。

学んだこと

  • dumpファイルをインポートしても、必ずしも必要なテーブルがすべて含まれているとは限らない
  • ローカル環境構築時は、アプリケーションが利用するDB構成と実際のDB構成を確認する必要がある

JISOUのメンバー募集中!

プログラミングコーチングJISOUでは、新たなメンバーを募集しています。
日本一のアウトプットコミュニティでキャリアアップしませんか?
興味のある方は、ぜひホームページをのぞいてみてください!

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?