A
A
Anna2017-03-05 16:32:34
linux
Anna, 2017-03-05 16:32:34

How to create a database on Linux from a file?

Good afternoon! Tell me, is it possible in Ubuntu to create a mySql database from a .sql file? (how is it done on Windows via sqlcmd)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Ne-Lexa, 2017-03-05
@annaoomph

The mysql command is used for this.
Log in to it, create a user, a database, grant the necessary rights and upload the file using the same command.
mysql -ulogin -p database_name < mysql_dumpl.sql

R
Ruslan Fedoseev, 2017-03-06
@martin74ua

do not confuse MSSQL and MySQL. These are different servers.
You have a dump from MSSQL. It will not expand in mysql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question