Home  >  Article  >  Database  >  关于mysql error number 1051和1418错误的处理

关于mysql error number 1051和1418错误的处理

WBOY
WBOYOriginal
2016-06-07 16:52:271570browse

mysql error number 1051 在网上(包括外国网) 说了一大堆,但就是没有人知道其中的缘由,这是store engine 不同造成的

mysql error number 1051 在网上(包括外国网) 说了一大堆,但就是没有人知道其中的缘由,这是store engine 不同造成的

例如,最开始的engine=myisam,在此基础上建了A表,那么你现在要转成innodb的方式(开启了my.cnf下的innodb的参数)现在如果再来 select A 表那么是会报不存在的,如果drop 的话会报 mysql error number 1051.这个问题该怎么处理呢? 哈哈,先关掉my.cnf的innodb参数,然后重启mysql,这样A就可以select 了,把A表的backup 下来,drop 掉A表,然后再开启innodb参数,重起mysql,restore 刚才备份的脚本,这样就可以搞定了.

如果在create function的时候有 1418的错语的时候:那么

set global log_bin_trust_routine_creators=1;

然后怎么create function 都不会有问题(当然,你的function必段正确哦),妈的,这是mysql的一个bug,搞不懂为什么,反正这样做就OK了.

在Oracle中根本就没有这种错语,如果出现了这种错语,是由于用户权限不够,OpenSource的东西就是这样的.还是Oracle的好.

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn