I have exported all my databases to a file using phpMyAdmin.
Unfortunately I don't have a working phpMyAdmin in my destination system.
How should I restore all of them at once using one line command?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
If you backed up many database to 1 file, I suppose you backed up the
create database statements in the same file. If not you only need to add the
create database and
use database statements to your file at the proper places.
After that, the command to load the file to mysql is:
mysql -p < sqlfile.sql
-p is to ask for your password.
You can use
-u username if you need to use another user.