Urgent mysql stopped working after importing a database
Hello, i have imported an database via this command :
mysql -u root < all_databases.sql
after it, everything stopped working. WHM >> phpmyadmin this is also not working. cPanel's phpmyadmin also not working.
mysql server is offline.
in whm >> phpmyadmin i am getting this error :
mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES)
Undefined index: auth_type
i tried changing password of users and root and mysql root but nothing works.
please help me fast
-
You seems to be overwrote everything with whatever in all_databases.sql was. If this is only one database you would need to restore it with: mysql -u username -p databasename < all_databases.sql Now in your case the best would be to restore the databases from backups. 0 -
I agree that restoring from backups is likely the best plan. 0 -
Yes you're right, actually i lost everything. Everything is corrupted. Now i restored everything and now working fine. Actually the file all_databases.sql contains 3-4 databases like datab_1 datab_2 datab_3 I talked with a guy he said it is not possible to restore all these databases from this file via a single command you have to restore every database one by one 0 -
It is definitely more complicated to restore from the all_databases.sql file than it is to perform individual restores. 0 -
If you have the all_databases.sql file and would like to restore using that, the following command will let you restore one database using the all_databases file: mysql --one-database database_name < all_databases.sql0
Please sign in to leave a comment.
Comments
6 comments