How to import DUMP file from remote computer into MySQL server

Hi Experts

I am new to MySQL server and I have just started to play with it. I want to create demo database Employees. I downloaded several .sql files and several .dump files. I understand that sql files contains mainly instructions how to setup database and individual tables, indexes etc. Dump files contains data to be inserted into given tables.

I installed MySql server on Unraid server (here it is installed as docker).

When I connect to server via MySQL Bench, all is OK. I am able to run queries, I am able to run Employees.sql but it gives me error as soon as it reaches where DUMP files are mentioned.

It looks that MySQL is not searching for dump files in directore of remote computer from which I started SQL script, but elsewhere.

So my question  how to import data into mySQL from DUMP file?

Many thanks

Vladimir BuzalkaCRAAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Prabhin MPDevOps EngineerCommented:
mysql -u <user> -p < db_backup.dump

this will help you  import
nociSoftware EngineerCommented:
If you care to look inside the dump files you will notice they are SQL scripts they do depend on some hints in the form of comments.
So you can restore dumps using the mysql command interface as Prabhin stated above.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vladimir BuzalkaCRAAuthor Commented:
Dear Prabhin and noci

thanks for your help, indeed it worked and without any problem. I am just wondering, when I open SQL script, I can see
flush /*!50503 binary */ logs;

SELECT 'LOADING departments' as 'INFO';
source load_departments.dump ;
SELECT 'LOADING employees' as 'INFO';
source load_employees.dump ;
SELECT 'LOADING dept_emp' as 'INFO';
source load_dept_emp.dump ;
SELECT 'LOADING dept_manager' as 'INFO';
source load_dept_manager.dump ;
SELECT 'LOADING titles' as 'INFO';
source load_titles.dump ;
SELECT 'LOADING salaries' as 'INFO';
source load_salaries1.dump ;
source load_salaries2.dump ;
source load_salaries3.dump ;

source show_elapsed.sql ;

I am wondering WHERE I should upload those DUMP files to allow above listed script work?

I am guessing that directly on MySQL machine, but where exactly?

Many thanks and again thanks for your help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.