How to solve error importing .sql file - You have an error in your SQL syntax; SQL SECURITY DEFINER

Subscribers:
4,970
Published on ● Video Link: https://www.youtube.com/watch?v=KtmUdfaoPsQ



Duration: 0:00
50 views
0


i run mysqldump to export my wordpress database (mysql 5.7) into .sql file, then i do importing back .sql to new database (other server), but it shows an error something like this:

ERROR 1064 (42000) at line 2334: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '172.31.%` SQL SECURITY DEFINER */

solution:
remove any DEFINER statement that exist in your .sql file.


sed -i 's/DEFINER=[^*]*\*/\*/g' mydump.sql

that solutions i found in stackoverflow:
https://stackoverflow.com/questions/9446783/remove-definer-clause-from-mysql-dumps




Other Videos By Ambar Hasbiyatmoko


2024-12-28How to solve composer - No composer.json in current directory when installing guzzlehttp
2024-12-12How to fix error installing openswan on Amazon Linux 2023 - Error: Unable to find a match: openswan
2024-12-07Change SSH key EC2 instance (Ubuntu)
2024-11-24Fixing Airbyte - You appear to have deployed over HTTP Make sure your have disabled secure cookies
2024-11-15How to fix airbyte - Failure in source. Saved offset no longer present on the server
2024-11-14How to solve wordpress - The update cannot be installed because some files could not be copied
2024-11-08How to solve kubernetes dashboard not showing CPU and RAM usage
2024-10-26How to uninstall kubernetes dashboard using helm chart
2024-10-26How to solve Kubernetes - configuration file is group-readable. This is insecure. Location: config
2024-10-24How to solve kubernetes: kubernetes.io/ingress.class is deprecated, please use spec.ingressClassName
2024-10-13How to solve error importing .sql file - You have an error in your SQL syntax; SQL SECURITY DEFINER
2024-09-03How to solve vault error - gosnowflake DBUS_SESSION_BUS_ADDRESS envvars looks to be not set
2024-08-10How to solve user in samba active directory (EC2 AWS) - Cannot connect to the IP RDP Server
2024-08-04How to solve samba active directory (ad-dc) on ubuntu - chgrp invalid group: domain users
2024-08-01How to solve samba join active directory - Our netbios name can be at most 15 chars long
2024-07-27How to solve resolv.conf in ubuntu - failed removing file /etc/resolv.conf Operation not permitted
2024-07-22How to solve netplan in ubuntu 22.04 - Cannot call Open VSwitch ovsdb server service is not running
2024-07-16How to solve virtualbox - Windows cannot read the ProductKey setting from the unattend answer file
2024-07-16How to solve - waiting for cache lock. Could not get lock dpkg lock-frontend It is held by process
2024-07-06How to solve arduino IDE on ubuntu 22.04 - ser_open can't open device dev ttyACM0 Permission denied
2024-05-20How to solve apt-get update error: Could not get lock var-lib..lock. It is held by process (aptd)