ERROR in "MysqlDump" Access denied?
When i try to run simple bash DB backup command on my paid shared hosting via SSH i get this error
mysqldump: Couldn't execute 'SHOW DATABASES': Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation (1227)
Tried adding skiplock then it errors same with access denied flush privileges etc, i had also tried without "--single-transaction" and "--force --lock-all-tables" [PHP]mysqldump --user=${USER} --password=${PASS} --single-transaction --quick --force --lock-all-tables --all-databases | gzip --quiet > "${backup_dir}/${backup_date}.sql.gzip"[/PHP]
Tried adding skiplock then it errors same with access denied flush privileges etc, i had also tried without "--single-transaction" and "--force --lock-all-tables" [PHP]mysqldump --user=${USER} --password=${PASS} --single-transaction --quick --force --lock-all-tables --all-databases | gzip --quiet > "${backup_dir}/${backup_date}.sql.gzip"[/PHP]
-
I had also checked PhpMyAdmin privileges . No matter what switch i use or don't i get this error this mysqldump: Couldn't execute 'SHOW DATABASES': Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation (1227)
i.imgur.com/7nYHXk4.png - Please Attach Images to Your Posts -0 -
I was able to reproduce the error, i found it. Whenever i use this switch "--all-databases" it will throw access denied. If i dont use this switch and specify hard-coded DB name then it works. Any solution for this? how to retrieve DB name onfly ? 0 -
I feel my host doesn't allow that and its very pathetic .. i tried $ echo "show databases;" | mysql $ echo "show databases;" | mysql -u [user with mysql access] $ echo "show databases;" | mysql -p -u [user with mysql access] But all shown privilege error, so tell me how in the world i find DB name so i can use that in mysqldump ?? ERROR 1045 (28000): Access denied for user 0 -
Yes, i opened a TICKET on my webhost and it clearly confirmed SHOW DATABASES privilege is not granted on shared servers due to security reasons
So, guys tell me some way to fetch the DB name?0 -
Still, looking for this.. So far i had tried 10+ method with absolute no success .. 0 -
I was able to reproduce the error, i found it. Whenever i use this switch "--all-databases" it will throw access denied. If i dont use this switch and specify hard-coded DB name then it works. Any solution for this? how to retrieve DB name onfly ?
Hello :) It makes sense that "--all-databases" does not work with a shared hosting plan because I believe it's designed to dump all MySQL databases on the server. Could you elaborate on your specific need? For instance, are you attempting to download a backup of your database, or do you require additional data? Thank you.0
Please sign in to leave a comment.
Comments
6 comments