[GH-ISSUE #1115] error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_TABLESPACE_EXISTS: Tablespace for table 'npm.migrations' exists. Please … #917

Closed
opened 2026-02-26 06:34:57 +03:00 by kerem · 9 comments
Owner

Originally created by @Roei639 on GitHub (May 21, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1115

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
The log returns an error and cannot be connected to the management interface
error create table migrations (id int unsigned not null auto_increment primary key, name varchar(255), batch int, migration_time timestamp) - ER_TABLESPACE_EXISTS: Tablespace for table 'npm.migrations' exists. Please DISCARD the tablespace before IMPORT

Nginx Proxy Manager Version
2.9.3

To Reproduce
Steps to reproduce the behavior:
4. See error

Expected behavior

Screenshots

Operating System
Ubuntu 20.04.2

Additional context
Installed in Docker

Originally created by @Roei639 on GitHub (May 21, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1115 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** The log returns an error and cannot be connected to the management interface error create table `migrations` (`id` int unsigned not null auto_increment primary key, `name` varchar(255), `batch` int, `migration_time` timestamp) - ER_TABLESPACE_EXISTS: Tablespace for table '`npm`.`migrations`' exists. Please DISCARD the tablespace before IMPORT **Nginx Proxy Manager Version** 2.9.3 **To Reproduce** Steps to reproduce the behavior: 4. See error **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** Ubuntu 20.04.2 **Additional context** Installed in Docker
kerem 2026-02-26 06:34:57 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@shaulliv commented on GitHub (Apr 14, 2023):

I had this issue with docker, a restart of the DB container fixed it.

<!-- gh-comment-id:1509208642 --> @shaulliv commented on GitHub (Apr 14, 2023): I had this issue with docker, a restart of the DB container fixed it.
Author
Owner

@cgraj04 commented on GitHub (May 7, 2023):

is this resolved yet, am also facing the same issue

<!-- gh-comment-id:1537442182 --> @cgraj04 commented on GitHub (May 7, 2023): is this resolved yet, am also facing the same issue
Author
Owner

@mateuscmtropical commented on GitHub (Jul 6, 2023):

One of the solutions that may work is to restart the DB container.

Another one of my cases, the volume was corrupted/dirty so I deleted it and did the docker build/up again.

<!-- gh-comment-id:1623611271 --> @mateuscmtropical commented on GitHub (Jul 6, 2023): One of the solutions that may work is to restart the DB container. Another one of my cases, the volume was corrupted/dirty so I deleted it and did the docker build/up again.
Author
Owner

@xela1601 commented on GitHub (Nov 8, 2023):

I also have this error. restarting the database did not help. I dont want to delete the volume, because i don't have it backed up.

<!-- gh-comment-id:1802450383 --> @xela1601 commented on GitHub (Nov 8, 2023): I also have this error. restarting the database did not help. I dont want to delete the volume, because i don't have it backed up.
Author
Owner

@pthoelken commented on GitHub (Nov 17, 2023):

I also have this error. restarting the database did not help. I dont want to delete the volume, because i don't have it backed up.

For your workaround you have to set the permissions manually by this script for example. Save this as startup_npm.sh in your folder from docker-compose.yml file.

docker-compose pull
docker-compose up -d
sleep 5
docker exec -it nginxproxymanager_nginxproxymanager-db_1 chown -R mysql:mysql /var/lib/mysql/nginxproxymanager

exit 0
<!-- gh-comment-id:1816604698 --> @pthoelken commented on GitHub (Nov 17, 2023): > I also have this error. restarting the database did not help. I dont want to delete the volume, because i don't have it backed up. For your workaround you have to set the permissions manually by this script for example. Save this as startup_npm.sh in your folder from docker-compose.yml file. ``` docker-compose pull docker-compose up -d sleep 5 docker exec -it nginxproxymanager_nginxproxymanager-db_1 chown -R mysql:mysql /var/lib/mysql/nginxproxymanager exit 0 ```
Author
Owner

@wufei0 commented on GitHub (Feb 29, 2024):

chown -R mysql:mysql /var/lib/mysql/nginxproxymanager

this solved my problem.

<!-- gh-comment-id:1970689452 --> @wufei0 commented on GitHub (Feb 29, 2024): > chown -R mysql:mysql /var/lib/mysql/nginxproxymanager this solved my problem.
Author
Owner

@pthoelken commented on GitHub (Feb 29, 2024):

I can't get, why this is not fixed till now in the base image.

<!-- gh-comment-id:1970711805 --> @pthoelken commented on GitHub (Feb 29, 2024): I can't get, why this is not fixed till now in the base image.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 12, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2408302743 --> @github-actions[bot] commented on GitHub (Oct 12, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Oct 15, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:3404255999 --> @github-actions[bot] commented on GitHub (Oct 15, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#917
No description provided.