mysql 将远程数据保存到本地

    技术2025-05-16  44

    mysql -u test -ptest -P5606 -Dtest_db -h192.168.8.2 -e "select id,name from test_table" >testData.txt ;

     

    其中:

    -u 用户名

    -p 密码

    -P 端口(如果默认,则为3306)

    -D 数据库名称

    -h host

    -e 要执行的sql语句

    最新回复(0)