fengzhiwu

    把查询mysql的结果输出到文件的过程中出现了错误

ERROR 1286 (42000): Unknown table engine \'InnoDB\'

    这个问题的原因是新版mysql是默认不安装innodb引擎插件的。

image

    解决方法是只要安装innodb引擎就行了

    安装方法,修改‘/etc/my.cnf’,添加如下行:

ignore-builtin-innodb
plugin-load=innodb=ha_innodb_plugin.so
plugin_dir=/usr/lib64/mysql/plugin    #插件动态库的目录

    重启mysqld服务

service mysqld restart

    可以看到innodb引擎已经安装好了

image

    数据库查询结果也能输出到文件中:

select * from block into outfile \'/tmp/001.xls\';

image

    OK!

分类:

技术点:

相关文章:

  • 2021-08-15
  • 2021-06-06
  • 2022-12-23
  • 2021-06-08
  • 2021-11-04
  • 2021-10-01
  • 2021-08-13
  • 2021-07-12
猜你喜欢
  • 2021-09-16
  • 2022-01-10
  • 2021-06-19
  • 2021-05-24
  • 2021-06-21
相关资源
相似解决方案