# if your database is not locally hosted
mysql -u username -p -h dbhost dbname < filename.sql
mysql -u<user_name> -puser_password> <database_name>
source /path/db.sql
Source : https://www.programmingquest.com/2018/08/how-to-export-mysql-database-using.html
open cmd
set mysql path in cmd
set path=c:wampinmysqlmysql5.6.17in
For database import (Restore):
mysql -u YourUser -p YourDatabaseName < filename.sql
#!/bin/sh
mysql -u root --password="${MYSQL_ROOT_PASSWORD}" --database=projectdb </tmp/projectdb.sql &&
rm /tmp/projectdb.sql
mysql>create database yourDatabaseName;
mysql>use yourDatabaseName;
mysql> create new_database;
mysql> use new_database;
mysql> source (Here you need to import the path of the SQL file);
E.g.:
mysql> source E:/test/dump.sql;
mysql> use db_name;
mysql> source backup-file.sql;
mysql -u database_user -p --default-character-set=utf8 [db_name] < database_file.sql
Code Example |
---|
Sql :: mysql fetch all data |
Sql :: sql duplicate a table with data |
Sql :: group by por mes sql mysql |
Sql :: express mysql |
Sql :: substring sql |
Sql :: redo files log oracle |
Sql :: sql insert values into table |
Sql :: oracle pl/sql package |
Sql :: connect to mysql c# connection string C# |
Sql :: json_remove mysql |
Sql :: sql pivot rows to columns |
Sql :: sql join on a subquery |
Sql :: Mysql Selected All Duplicate Rows |
Sql :: mysql find max value row |
Sql :: how to convert external table to managed table in hive |
Sql :: sql composite key |
Sql :: cast in sql |
Sql :: multiple left join mysql |
Sql :: oracle drop type |
Sql :: drop procedure if exists sql server |
Sql :: sql count() |
Sql :: get size of mysql database |
Sql :: how to find sql server installation folder |
Sql :: oracle cpu metric |
Sql :: how to check which table has data in mysql |
Sql :: hour must be between 1 and 12 |
Sql :: Search In the Database using Text |
Sql :: replace sql |
Sql :: tablo silme SQL |
Sql :: pl sql if boolean |