我正在使用phpMyAdmin的最新版本(4.4.12)。 当我试图在" SQL" -Tab数据库或表中运行无效的mysql命令时,phpmyadmin不会返回任何错误消息。
例如我尝试:
CREATE VIEW test (a, b c) AS SELECT "A" as a, "B" as b, "C" as c
(注意&#34之后缺少的逗号; b"!) 运行此格式错误的命令phpMyAdmin将返回一条成功消息("绿色复选标记")和一条消息,即mysql返回零数据集 - 这对于CREATE命令是正确的。
看来,phpmyadmin没有检查mysql错误或没有返回它们。
我在旧版本(4.4.3)中遇到了同样的问题
是错误还是错误配置?
编辑:我发现,如果我发送SQL两次,但只有复杂的查询,它有时(!)有效。如果我发送两次,上面的示例仍然不会抛出错误。
另一个例子:
INSERT INTO test
(a,b c)VALUES(1,2,3);
(在" b&#34之后也缺少逗号;)
返回:" OK插入-1行。 (查询耗时0.0009秒。)"
所以,-1必须是一个错误。但phpMyAdmin返回绿色复选标记而不是错误。
我的config.inc.php:
<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 4.4.12 setup script
* Date: Thu, 23 Apr 2015 13:25:48 +0200
*/
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['nopassword'] = true;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['tracking_version_auto_create'] = true;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* End of servers configuration */
$cfg['blowfish_secret'] = '5538d3a45e6924.68498003';
$cfg['DefaultLang'] = 'de';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['CheckConfigurationPermissions'] = false;
$cfg['AllowArbitraryServer'] = true;
$cfg['LoginCookieDeleteAll'] = false;
$cfg['UserprefsDeveloperTab'] = true;
$cfg['DBG']['sql'] = true;
$cfg['MaxRows'] = 500;
$cfg['Order'] = 'DESC';
?>
答案 0 :(得分:0)
在 phpMyAdmin 中运行此无效的mysql命令:
CREATE VIEW test (a, b c) AS SELECT "A" as a, "B" as b, "C" as c
我收到了以下错误消息:
errors were found during analysis.
A comma or a closing bracket was expected (near "c" at position 23)
所以只有您的版本有此问题,重新安装或重置设置。