What do you want to save?
Add Code snippet
New code examples
-
SQL 2021-11-02 19:57:09
mysql dump specific tables
#note by specifying -p flag without a password it'll prompt you for pass #dump specific files to a SQL file mysqldump -u userHERE -p --lock-tables=false database_name table1 table2 table3 > mydb_tables.sql #if you want to import a file into the data... Add solution -
SQL 2021-10-28 19:56:09
mysqldump password in file
add this to .my.cnf file user can be omitted [mysqldump] user=mysqluser password=secret The -p option must be excluded from the command in order to use the password in the config file. Correct: mysqldump –u my_username my_db > my_db.sql Wrong: ... Add solution -
PHP 2021-10-28 17:54:14
can i back up mysql database from php code?
<?php $dbhost = 'localhost:3036'; $dbuser = 'root'; $dbpass = 'rootpassword'; $backup_file = $dbname . date("Y-m-d-H-i-s") . '.gz'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass ". "test_db | g... Add solution -
SQL 2021-10-17 12:43:03
copy database mysql
// if you didnt create the target db, do it: mysql -u your_user -p > CREATE DATABASE the_db_cloned_name; > SHOW DATABASES // then check if it is created and so you're ready to proceed mysqldump -u your_user -p the_db_name > /directory/file_name... Add solution -
Other 2021-10-09 11:36:07
mariadb clone database to another name
// if you didnt create the target db, do it: mysql -u your_user -p > CREATE DATABASE the_db_cloned_name; > SHOW DATABASES // then check if it is created and so you're ready to proceed mysqldump -u your_user -p the_db_name > /directory/file_name... Add solution -
-
SQL 2021-10-02 19:45:02
mysqldump cli command
mysqldump -u username -p dbname > filename.sql Add solution
Best helpers
Srishti L
+5
Dan Romik
+5
Enceladus
+5
Jaehyeon Yu
+5
Rrrrhh
+5
Ciara
+5
L E Morin
+5
EHH
+5
BuckNaked69
+5
Supes9
+5
Anirudhan J
+5