littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
624 stars 113 forks source link

Update ss-dump-database.txt #185

Closed gingibash closed 1 year ago

gingibash commented 1 year ago

Fix: DB user does not have permissions to dump DB, changed function to ss_mysqldump_admin

jessuppi commented 1 year ago

Thanks @gingibash

I was considering doing this patch last week too. The problem is that it breaks MySQL dumps for remote databases, since they are setup using the non-admin database user in SlickStack.

I think this is only an issue on Ubuntu 20.04 currently, perhaps we can patch user permissions instead.

gingibash commented 1 year ago

Hello @jessuppi

or check if the DB_HOST is 127.0.0.1 or remote?

jessuppi commented 1 year ago

Great idea @gingibash here's the patch I committed: https://github.com/littlebizzy/slickstack/commit/5dc7eaa13a52e00504ab5b128851e0533570f47b

I'm not sure if it works in the case of staging/dev sites using the remote database, but I guess that's not the main concern for now and it should work for localhost.