Unable to import database with user[all permission granted still getting that error] - ERROR 1044 (42000): Access denied for user
Solution :
Note: Before playing wiht any file to your system make backup then only try
1. First of verify the user with which you are trying to export database
2.Check the database, there might be database name defined in the sql so that would problem
lets say you are trying to import database 'xyz.sql' to the test_db <DB name>
then vi xyz.sql
check the top 10 lines, you might see the defined database name already their. So you need to replace that database name with test_db < i mean you db name> .
Possibly, you need to change the older db name with your new db name to which you want to import
3. mysql -u username -p dbname < xyz.sql
Solution :
Note: Before playing wiht any file to your system make backup then only try
1. First of verify the user with which you are trying to export database
2.Check the database, there might be database name defined in the sql so that would problem
lets say you are trying to import database 'xyz.sql' to the test_db <DB name>
then vi xyz.sql
check the top 10 lines, you might see the defined database name already their. So you need to replace that database name with test_db < i mean you db name> .
Possibly, you need to change the older db name with your new db name to which you want to import
3. mysql -u username -p dbname < xyz.sql
Comments
Post a Comment