My database password has special characters, but I didn't escape the special characters in my password.
By adding a backslash before the special characters (! # ' " ` & ; and $), I was able to run the command successfully. Hope that it can help you if your database password has special characters. Thank you.
Can you please confirm that you import DB uses any DEFINER in any table???
For checking this you need to export the db by
mysqdump -u<username> -p<password> <db_name> > db_name.sql
Then Run below command
grep -rnw ./db_name.sql -e 'DEFINER'
if you get any return value than run below command
sed -i 's/DEFINER=`root`@`localhost`/ /g' db_name.sql
This command will replace your DEFINER root to NULL so, you can access with the current Database user.
If my answer is useful, please Accept as Solution & give Kudos
Use DB host = 127.0.0.1 instead of localhost
I am facing same issue and i am using xxamp kindly guide me.I am stuck magento installing process last 3 days. if you can guide me so please guide whole installation process from 1 to 10 Thank You