705   MySQL

MySQL 命令行导出xls文件,使用outfile命令

select * from table into outfile ‘/tmp/mysql/test.xls’

如果遇到报错

ERROR 1045 (28000): Access denied for user ‘user’@’%’

一般是文件夹权限问题,赋权给outfile的目录就行啦




Leave a Reply

Your email address will not be published. Required fields are marked *