nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.69k stars 4k forks source link

[Bug]: Nextcloud tries to use @'localhost' user on a remote DB installation #47431

Closed ClaraCrazy closed 3 weeks ago

ClaraCrazy commented 3 weeks ago

⚠️ This issue respects the following points: ⚠️

Bug description

After some infrastructure changes, our SQL server is now finally seperate. Issues started to show up right away with nextcloud unfortuantely.

As can be seen in the image, nextcloud still tries to query via @'localhost' on the remote server. I'm puzzled by that. Simply creating an @'localhost' user on the SQL server fixed it, but uh... why? On remote DB solutions it (imo) should be expected that permissions are set to a single user@host, i.e. 'nextclouduser'@'1.1.1.1', as was the case here. The DB access is expected to come from, and identify as, the correct machine, so the fact it picks localhost broke quite a few things at first.

I just cant understand why right now connects to a remote db server, and then queries it pretending to be localhost. Not only is this very questionable, but this would mean I'd either have to know, and prepare a user with @'localhost', or do the worst and grant to @'%', which god forbid anyone actually does.

image

Steps to reproduce

  1. Set up remote DB with only user allowed to access db being 'whatever'@'your-nextcloud-internal-ip'
  2. Configure dbhost and username in your config
  3. Watch things fail

Expected behavior

nextcloud should use fqdn (or have a config option) for this, so sql commands work fine, without needing another localhost user on the DB server.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.9.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "htaccess.RewriteBase": "\/",
        "default_phone_region": "DE",
        "auth.webauthn.enabled": false,
        "enable_previews": true,
        "preview_max_memory": -1,
        "maintenance_window_start": 1,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\Movie",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MP3",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI"
        ],
        "app_install_overwrite": {
            "0": "socialsharing_email",
            "1": "socialsharing_facebook",
            "2": "socialsharing_twitter",
            "3": "socialsharing_diaspora",
            "4": "hsts",
            "5": "dropit",
            "6": "workflow_media_converter",
            "7": "files_texteditor",
            "8": "workflow_pdf_converter",
            "9": "backup",
            "10": "documentserver_community",
            "11": "dicomviewer",
            "12": "files_3d",
            "13": "imageconverter",
            "14": "occweb",
            "15": "twofactor_admin",
            "16": "talk_matterbridge",
            "17": "workflow_script",
            "18": "sharingpath",
            "19": "apporder",
            "20": "breezedark",
            "21": "riotchat",
            "22": "extract",
            "23": "impersonate",
            "24": "files_markdown",
            "25": "hibp",
            "27": "cfg_share_links",
            "28": "files_archive",
            "30": "files_rightclick",
            "31": "secrets"
        },
        "maintenance": false,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 3,
        "logdateformat": "F d, Y H:i:s",
        "knowledgebaseenabled": false,
        "theme": "",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        },
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "enforce_theme": "breezedark"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - apporder: 0.15.0
  - backup: 1.4.0
  - breezedark: 28.0.0
  - bruteforcesettings: 2.8.0
  - cadviewer: 9.71.1
  - calendar: 4.7.12
  - camerarawpreviews: 0.8.5
  - cfg_share_links: 5.1.0
  - checksum: 1.2.4
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - cloud_py_api: 0.1.9
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - drop_account: 2.5.0
  - encryption: 2.16.0
  - external: 5.3.1
  - extract: 1.3.6
  - facerecognition: 0.9.51
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_archive: 1.2.3
  - files_linkeditor: 1.1.20
  - files_notify_redis: 0.3.3
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_retention: 1.17.2
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - files_zip: 1.5.0
  - google_synchronization: 2.2.0
  - htmlviewer: 28.1.2
  - imageconverter: 2.0.1
  - impersonate: 1.15.0
  - integration_dropbox: 2.2.0
  - integration_github: 2.0.7
  - integration_gitlab: 3.0.0
  - integration_google: 2.2.0
  - integration_onedrive: 3.2.1
  - integration_reddit: 2.0.3
  - integration_twitter: 1.0.7
  - integration_youtube: 0.2.1
  - keeweb: 0.6.19
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - metadata: 0.20.0
  - notifications: 2.16.0
  - notify_push: 0.6.12
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - passwords: 2024.7.20
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - quota_warning: 1.19.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.8
  - richdocumentscode: 24.4.502
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - side_menu: 3.13.1
  - socialsharing_email: 3.1.0
  - socialsharing_facebook: 3.1.0
  - socialsharing_twitter: 3.1.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - suspicious_login: 6.0.0
  - systemtags: 1.18.0
  - terms_of_service: 2.4.0
  - text: 3.9.1
  - theming: 2.3.0
  - transfer: 0.6.3
  - twofactor_backupcodes: 1.17.0
  - twofactor_email: 2.7.4
  - twofactor_totp: 10.0.0-beta.2
  - twofactor_webauthn: 1.4.0
  - unroundedcorners: 1.1.3
  - updatenotification: 1.18.0
  - user_migration: 5.0.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - files_external: 1.20.0 (installed 1.13.0)
  - firstrunwizard: 2.17.0 (installed 2.11.0)
  - nextcloud_announcements: 1.17.0 (installed 1.11.0)
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"QjRgS9PCV4M8wv5TdTSF","level":3,"time":"2024-08-22T12:15:02+00:00","remoteAddr":"","user":"--","app":"files","method":"","url":"--","message":"Error while trying to scan mount as /Clara/:An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist","userAgent":"--","version":"28.0.4.1","exception":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist","Code":1449,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1208,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":393,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":304,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":240,"function":"addToCache","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":352,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":577,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":589,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":576,"function":"runBackgroundScanJob","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Utils/Scanner.php","line":185,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":117,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist","Code":1449,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":393,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":304,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":240,"function":"addToCache","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":352,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":577,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":589,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":576,"function":"runBackgroundScanJob","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Utils/Scanner.php","line":185,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist","Code":"HY000","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":393,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":304,"function":"update","class":"OC\\Files\\Cache\\Cache","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":240,"function":"addToCache","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":352,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":577,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":589,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":576,"function":"runBackgroundScanJob","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Utils/Scanner.php","line":185,"function":"backgroundScan","class":"OC\\Files\\Cache\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":76,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->"},{"file":"/var/www/nextcloud/apps/files/lib/BackgroundJob/ScanFiles.php","line":113,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"message":"Error while trying to scan mount as /Clara/:An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist","exception":[],"CustomMessage":"Error while trying to scan mount as /Clara/:An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('nextclouduser'@'localhost') does not exist"},"id":"66c759038fa69"}

Additional info

No response

ClaraCrazy commented 3 weeks ago

great... ofc localhost is a user on github. sorry for the mention, bud! fixed my comment accordingly

kesselb commented 3 weeks ago

https://stackoverflow.com/questions/10169960/mysql-error-1449-the-user-specified-as-a-definer-does-not-exist wasn't helpful? A few people over there mention, that the run into that problem when moving from localhost to a remote db. I'm not aware where/if we are using triggers in Nextcloud.

joshtrichards commented 3 weeks ago

I just cant understand why right now connects to a remote db server, and then queries it pretending to be localhost.

The error is a bit misleading I suppose, but it's from MySQL/MariaDB not us. My understanding is it's referring to the context that db server-side things are executed in (unlike other types of db authentication errors).

https://dev.mysql.com/doc/refman/8.4/en/stored-objects-security.html

https://stackoverflow.com/questions/3206820/change-the-stored-procedure-definer

I'm not aware of any (procedures, functions, triggers, and events) we use in core or shipped apps that would trigger (no pun intended) this problem. So it won't happen in a conventional installation AFAIK (I've never encountered it nor seen it come up). Maybe one of your installed apps, particularly third-party ones, has one or more { procedures, functions, triggers, and events } defined?

So pretty certain this isn't a bug on our side, but might be overlooking a spot.

A quick and dirty way to find the source would be to do a db dump then grep for DEFINER. :-)

ClaraCrazy commented 3 weeks ago

First of all, I apologize. This is NOT a nextcloud issue. I feel like an idiot now

Second, @joshtrichards you are correct. That lead me to line ~495k of the dump... how fun.

/*!50003 CREATE*/ /*!50017 DEFINER=`nextclouduser`@`localhost`*/ /*!50003 TRIGGER memories_fcu_trg

unsure how to edit this in the db right now, as im a bit stupid evidently, but I'll get there :)

Perhaps something to make sure others in the future wont get confused tho, slight clarification / different wording on that specific error?

ClaraCrazy commented 3 weeks ago

I'll also close this for now. Should be fine

joshtrichards commented 3 weeks ago

No worries!

I think this is pretty new. Landing in pulsejet/memories#1101 from the looks of it.

Memories is a popular app so it's good to know this may crop up.

ClaraCrazy commented 3 weeks ago

For all people that have this, or similar, happen in the future:

mysqldump -u username -p --routines --add-drop-trigger --no-create-info --no-data --no-create-db --skip-opt database_name > outputfile.sql

then go edit the (very small, only containing triggers) resulting sql dump, and re-import again with

mysql -u username -p database_name < outputfile.sql

:heart: