MySQL WorkBench: dumping whole data base in one sql file - mysql

I'm using MysQL 5.6 and MySQL 6.1 WorkBench. I found this on how to dump whole data base
with values, but the problem is it separates every table into one sql file. How can I dump whole data base to only one sql file?

Use the Option "Export to Self-Contained File to dump the selected database(s) into one sql file:

Related

CSV and Database

Suppose there are changes in the .CSV file which I've used to enter data in the database, how can I reflect those changes in the same database, say using MySQL Workbench or MySQL command line?

Moving mySQL data to postgres, using a PostgreSQL schema file

I have a PostgreSQL schema file, and I have an SQL dump from a MySQL database. I want to know how I can import my MySQL dump file into Postgresql, using the postgresql schema file.
You cna't direct restore mysql dump file into postgres
You use psotgresql wiki or specific software trasnfer like:
Postgresql wiki
ESF Database Migration Toolkit
Can you install another MySQL, load the dump there, and export the data in CSV format? This should allow you to load the data into PostgreSQL, using the COPY command.

Import CSV file into MySQL without using load data infile

I have recently switched web hosting providers and the new provider does not allow 'load data infile' commands in MySQL. However, I have many CSV files that update tables in a database weekly using that command. What is the best way to import into MySQL without the typical load data option? I tried mysqlimport, but that seems to fail since the data isn't in SQL format, its just standard CSV data. Thanks for your help.
Use the following process:
Convert the CSV to the MySQL CSV dump format
Upload the file to the MySQL server or to the shared hosting file system
Use one of the following commands to import it:
mysqladmin:
mysqladmin create db1
mysql db1 < dump.csv
mysql:
mysql> CREATE DATABASE IF NOT EXISTS db1;
mysql> USE db1;
mysql> source dump.csv
References
MySQL :: MySQL 5.7 Reference Manual :: 7.4.2 Reloading SQL-Format Backups
Text::CSV::Auto - Comprehensive and automatic loading, processing, and analysis of CSV files. - metacpan.org
MySQL :: MySQL 5.7 Reference Manual :: 8.4.3 Dumping Data in Delimited-Text Format with mysqldump
Restore data from a tab delimited file to MySQL - Electric Toolbox
Using mysqldump to save data to CSV files - Electric Toolbox
Mysqldump in CSV format

Duplicating PostgreSQL database on one server to MySQL database on another server

I have a PostgreSQL database with 4-5 tables (some of those have more than 20 million rows). i have to replicate this entire database onto another machine. However, there I have MySQL (and for some reason cannot install PostgreSQL) on that machine.
The database is static and is not updated or refreshed. No need to sync between the databases once replication is done. So basically, I am trying to backup the data.
There is a utility called pg_dump which will dump the contents onto a file. I can zip and ftp this onto the other server. However, I do not have psql on the other machine to reload this into a database. Is there a possibility that mysql might parse and decode this file into a consistent database?
Postgres is version 9.1.9 and mysql is version 5.5.32-0ubuntu0.12.04.1.
Is there any other simple way to do this without installing any services?
Depends on what you consider "simple". Since it's only a small number of tables, the way I'd do it is like this:
dump individual tables with pg_dump -t table_name --column-inserts
edit the individual files, change the schema definitions to be compatible with mysql (e.g. using auto_increment instead of serial, etc. : like this: http://www.xach.com/aolserver/mysql-to-postgresql.html only in reverse)
load the files into the mysql utility like you would any other mysql script.
If the files are too large for step #2, use the -s and -a arguments to pg_dump to dump the data and the schema separately, then edit only the schema file and load both files in mysql.

Mysql : Dump/Exports existing data to a .sql file

I have a database. All I want to do is dump ALL the existing data in every table to I can then use it to simply import the SQL to my new database?
Im presuming the dump will be a bunch of MySQL INSERT statements
You can also use mysqldump, native mysql tool for this purpose.
You can use a tool such as mysql workbench or phpmyadmin to create the dump.
It will be a bunch of inserts as well as all the other data in it (such as procedures).