Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR 1227 (42000) at line 1566: Access denied; you need (at least one of) the SUPER privilege(s) for this operation #437

Closed
boris1988 opened this issue Mar 30, 2021 · 2 comments

Comments

@boris1988
Copy link

Description
bin/mysql < ../../Downloads/dump.sql

ERROR 1227 (42000) at line 1566: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
Снимок экрана 2021-03-30 в 09 26 20

Steps To Reproduce
1.bin/mysql < ../../Downloads/dump.sql

Expected Result
Database has imported

Actual Result
Got permission error

@rangerz
Copy link
Contributor

rangerz commented Mar 31, 2021

Normally, importing database should not use root privileges.

It need to remove DEFINER from your export sql file.

ref: https://stackoverflow.com/questions/9446783/remove-definer-clause-from-mysql-dumps

cat dump.sql | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' > dump_backup.sql
# and them import again
bin/mysql < ../../Downloads/dump_backup.sql

Other option to root privileges

bin/clinotty mysql -hdb -u root -pmagento magento < ../../Downloads/dump_backup.sql

Good Luck

@boris1988
Copy link
Author

@rangerz Thanks
This solved my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants