Search
 
SCRIPT & CODE EXAMPLE
 

SQL

import mysql cli

# export
mysqldump -u NAMAUSER -p NAMADATABASE > dbexport.sql
mysqldump -u NAMAUSER -p -h 172.23.0.3 NAMADATABASE > dbexport.sql # with host

# import
mysql -u NAMAUSER -p NAMADATABASE < dbexport.sql
mysql -u NAMAUSER -p -h 172.23.0.3 NAMADATABASE < dbexport.sql # with host
Comment

import mysql database command line

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
Comment

how to import mysql database command line

mysql>create database yourDatabaseName;
mysql>use yourDatabaseName;
Comment

import database mysql command line

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;
Comment

mysql import command windows

C:wampinmysqlmysql5.0.51bin>mysql -u root -p YourDatabaseName < YourFileName.sql
Comment

import mysql command line

mysql> use db_name;
mysql> source backup-file.sql;
Comment

import database mysql command line

mysql -u database_user -p  --default-character-set=utf8 [db_name] < database_file.sql
Comment

PREVIOUS NEXT
Code Example
Sql :: acual month sql 
Sql :: postrgesql concat 2 columns divided by ; 
Sql :: how to insert same table data using mysql query 
Sql :: postgres sql alter table delete row 
Sql :: postgresql alter column data type from integer to integer array 
Sql :: identify rows with 2 same column value and delete duplicate mysql 
Sql :: oracle add attribute to table 
Sql :: window function sql 
Sql :: mysql stored procedure insert if not exists 
Sql :: sql creating tables 
Sql :: mysql select field if condition 
Sql :: timestamp to date sql server 
Sql :: create table 
Sql :: parent child hierarchy in sql 
Sql :: android sqlite get rows count 
Sql :: sql server get week dates from week number 
Sql :: trigger in mysql 
Sql :: apex for oracle 11g 
Sql :: sqlalchemy query join many to many 
Sql :: oracle select 
Sql :: update database collation in postgresql 
Sql :: selecting all columns from table sql database 
Sql :: add column mysql 
Sql :: test connection to sql server 
Sql :: sql check 
Sql :: sql logo 
Sql :: oracle sysdba connect as another user 
Sql :: sql examples from framework 
Sql :: order child below the parent in mysqli 
Sql :: mysqlimport: Error: 4166 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =