EXPORTING AND IMPORTING DATA IN MYSQL
OVERVIEWDifferent ways if exporting and importing Exporting database in mysqlImporting database in mysql
Different ways of exporting and importing dataImport and export data graphically via phpMyAdminUse an SSH tunel for mysql and use a third party toolUse mysql command line
Import and export data graphically via phpMyAdminSteps to export a database 1.Login to phpMyAdmin 2.Select the database 3.Select the export tab 4.Click select all so that tables in your database are selected
5.Under export tab, select sql6.Select the structure7.Select data8.Select save file as and choose preferred compression format9.Click on GOMysql data will be downloaded to your default browser’s destination.
 Steps to import a database from phpMyAdminbefore the data can be imported, the database must be created and user privileges must be assigned to it.Login to your cpanel with your username and passwordClick on mysql databases
create your new database by entering the nameClick on “add database” Enter the username and password Click on “add user” Add  new user to the database by selecting user and databaseClick on “add user to database”Click on “phpMyAdmin”
1.Login to phpMyAdmin2.Select on import menu3.Locate sql file on your computer4.Click on GOThis method has limitations especially when we have to download very large files, this method doesn’t work well.
EXPORTING DATABASE THROUGH COMMAND LINEUse mysqldump which is a tool to export and import databaseIt is used to backup the database or move the databases from one server to the other server.To export your data as a backup use# mysqldump -u username -ppassword  database_name>FILE1.sql
Replace the username, password and database name with your username, password and database details.FILE1 will contain the backup file, download the file to your computer.
IMPORTING DATABASE THROUGH COMMAND LINEWe can restore the data from backup fileOrImport it from another MYSQL server.
Upload the file FILE1.sql to the server and run the command#mysql -u username -ppassword  database_name<FILE1.sql Replace the username, password and database name with your username, password and database details.
OTHER WAYS OF EXPORTING AND IMPORTING DATAData can be imported from a XML source and can be retrieved from MYSQL in XML format.Import and export delimited data from ms excel or ms access.
Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net

Exporting And Importing Data In Mysql

  • 1.
  • 2.
    OVERVIEWDifferent ways ifexporting and importing Exporting database in mysqlImporting database in mysql
  • 3.
    Different ways ofexporting and importing dataImport and export data graphically via phpMyAdminUse an SSH tunel for mysql and use a third party toolUse mysql command line
  • 4.
    Import and exportdata graphically via phpMyAdminSteps to export a database 1.Login to phpMyAdmin 2.Select the database 3.Select the export tab 4.Click select all so that tables in your database are selected
  • 5.
    5.Under export tab,select sql6.Select the structure7.Select data8.Select save file as and choose preferred compression format9.Click on GOMysql data will be downloaded to your default browser’s destination.
  • 6.
    Steps toimport a database from phpMyAdminbefore the data can be imported, the database must be created and user privileges must be assigned to it.Login to your cpanel with your username and passwordClick on mysql databases
  • 7.
    create your newdatabase by entering the nameClick on “add database” Enter the username and password Click on “add user” Add new user to the database by selecting user and databaseClick on “add user to database”Click on “phpMyAdmin”
  • 8.
    1.Login to phpMyAdmin2.Selecton import menu3.Locate sql file on your computer4.Click on GOThis method has limitations especially when we have to download very large files, this method doesn’t work well.
  • 9.
    EXPORTING DATABASE THROUGHCOMMAND LINEUse mysqldump which is a tool to export and import databaseIt is used to backup the database or move the databases from one server to the other server.To export your data as a backup use# mysqldump -u username -ppassword database_name>FILE1.sql
  • 10.
    Replace the username,password and database name with your username, password and database details.FILE1 will contain the backup file, download the file to your computer.
  • 11.
    IMPORTING DATABASE THROUGHCOMMAND LINEWe can restore the data from backup fileOrImport it from another MYSQL server.
  • 12.
    Upload the fileFILE1.sql to the server and run the command#mysql -u username -ppassword database_name<FILE1.sql Replace the username, password and database name with your username, password and database details.
  • 13.
    OTHER WAYS OFEXPORTING AND IMPORTING DATAData can be imported from a XML source and can be retrieved from MYSQL in XML format.Import and export delimited data from ms excel or ms access.
  • 14.
    Visit more selfhelp tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net