NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.37k stars 2.71k forks source link

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 #1115

Open Roei639 opened 3 years ago

Roei639 commented 3 years ago

Checklist

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:

  1. See error

Expected behavior

Screenshots

Operating System Ubuntu 20.04.2

Additional context Installed in Docker

shaulliv commented 1 year ago

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

cgraj04 commented 1 year ago

is this resolved yet, am also facing the same issue

mateuscmtropical commented 1 year ago

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.

xela1601 commented 1 year ago

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.

pthoelken commented 1 year ago

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
wufei0 commented 9 months ago

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

this solved my problem.

pthoelken commented 9 months ago

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

github-actions[bot] commented 1 month ago

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