U
U
Urukhayy2015-04-24 13:08:32
MySQL
Urukhayy, 2015-04-24 13:08:32

How to insert the db_backup.sql database via SSH as a new database?

How to insert the db_backup.sql database via SSH as a new database?
There is a db_backup.sql file in the root folder, this is a database backup. You need to add a new database, and insert this backup there. Insert via SSH, and I can create a new database in phpmyadmin.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alex stephen, 2015-04-24
@Urukhayy

Well, actually, everything is googled in a minute
. First, we go into mysql (the most convenient way to do this is in the dump folder)
Next, create a database:
Go to it:
And fill it with a dump
UPD: updated the answer for the trolls from the comments. I made a reservation, and immediately flew in ...

S
Sergey, 2015-04-24
@Weidmann

mysql -u root -p
CREATE DATABASE new_database;
show databases;
mysql -u root -p new_database < ./db_backup.sql

M
mureevms, 2015-04-24
@mureevms

What tools were used to dump the db_backup.sql database?
If from phpmyadmin, then from there you need to import.
If using mysqldump, then something like this:
The database must first be removed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question