How to use mysqldump for a portion of a table?

后端 未结 7 734
自闭症患者
自闭症患者 2020-12-12 12:30

So I can export only a table like this:

mysqldump -u root -p db_name table_name > table_name.sql

Is there any way to export only a porti

7条回答
  •  死守一世寂寞
    2020-12-12 13:20

    In my case i have execute this:

    SELECT * 
      INTO OUTFILE 'C:\Documents and Settings\Anton.Zarkov\Desktop\joomla_export\data_AZ.sql'
      FROM `jos_glossary`
     WHERE id>6000
    
    • there is no syntax error - the query passes through.
      1. The result is NULL - no rows were written. (I'm sure - the last ID is 6458)
      2. If I repeat the query an error occurs => #1086 - File 'C:Documents and SettingsAnton.ZarkovDesktopjoomla_exportdata_AZ.sql' already exists
      3. Unfortunately I cannot find the "existing" file anywhere on disk C. Where is it?

    The conditions are: phpMyAdmin SQL Dump; version 3.4.5; host: localhost; server version: 5.5.16; PHP version: 5.3.8

提交回复
热议问题