Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysqldump

# Syntax
mysqldump -u [username] -p [database-to-dump] > [database-to-receive]

# Pipe it! Exporting DB from external host
mysqldump -u [username] -P [port] -h [host] [database-to-dump] | mysql -u root -h 127.0.0.1 [database-to-receive]

# Export specific tables by typing the name after the targeted DB
mysqldump -u [username] -P [port] -h [host] [database-to-dump] [tabl1] [table2] [table3] | mysql -u root -h 127.0.0.1 [database-to-receive]
Comment

install mysqldump

# Mysql
sudo apt-get install mysql-client
# MariaDB
sudo apt-get install mariadb-clients
Comment

mysqldump cli

/etc/init.d/nginx start
Comment

mysqldump

mysqldump -u [username] -p [database-to-dump] > filename(e.g. dump.sql)

# or 
sudo mysql database_name > filename
Comment

mysqldump

mysqldump -u [username] -p [database-to-dump] > [database-to-receive].sql
Comment

mysqldump cli command

Press CTRL+C to copy shell> mysqldump --databases db1 db2 db3 > dump.sql
Comment

PREVIOUS NEXT
Code Example
Sql :: advantages of stored procedures sql 
Sql :: sql delete table 
Sql :: Concatenate columns in table 
Sql :: read sql file in python pandas 
Sql :: psql query execution time 
Sql :: sql query to delete duplicate records 
Sql :: select columns from 2 tables with foreign key 
Sql :: where name ends in SQL 
Sql :: how mysql store datetime 
Sql :: install mssql on ubuntu 
Sql :: sql online compiler 
Sql :: can i use alias in where clause 
Sql :: oracle procedure teamplate 
Sql :: what is mysql 
Sql :: TSQL convert csv to table 
Sql :: datatables server side filter where clause 
Sql :: triggers db 
Sql :: Example SQL Test 
Sql :: subquery sql 
Sql :: sql query checker 
Sql :: create-toys-table-with-toy_name-column 
Sql :: sqlite dropping multiple tables 
Sql :: load utilities in sql server 
Sql :: postgresql interview questions 
Sql :: search all tables in a database for a value 
Sql :: get start of week big query 
Sql :: how to run parallel queries in sql server with entity framework 
Sql :: oracle dbms scheduler repeat interval every 5 minutes 
Sql :: acceso denegado en msql 
Sql :: CREATE MULTIPLE FK 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =