Mysql XML table export command line

前端 未结 2 434
伪装坚强ぢ
伪装坚强ぢ 2021-01-07 13:32

Maybe I\'m not seeing something here but WHY would this command line work perfectly fine and provide a result set when run on a LINUX command line but when executed from a W

相关标签:
2条回答
  • 2021-01-07 13:50

    Windows command line does not recognize ' as a quote character, so your statement parameter becomes SELECT (truncated at the 1st space).

    You must use " instead, as Heena Hussain suggested.

    0 讨论(0)
  • 2021-01-07 14:02

    Can you please try this...

    C:\>mysql -u <userid> -p<password> -e "SHOW VARIABLES LIKE '%version%'" –-xml
    

    and this...

    mysql -u db_user -p db_name --xml -e "SELECT * FROM table_name" > table_name.xml
    
    0 讨论(0)
提交回复
热议问题