当前位置:首页 > 开发 > Web前端 > 前端 > 正文

mysql错误-UncategorizedSQLException 1449

发表于: 2012-03-31   作者:cuityang   来源:转载   浏览次数:
摘要: 错误: UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1449];   解决: 出错的意思是数据库访问时没有‘@’这个用户.这主要是在新建视图和存储过程时,我直截在mysql可视

错误:

UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1449];  

解决:

出错的意思是数据库访问时没有‘@’这个用户.这主要是在新建视图和存储过程时,我直截在mysql可视图形工具里copy代码到服务器上去运行,mysql里会自动生成一些代码,比如copy出来的视图语句:
    DROP VIEW IF EXISTS `testdb`.`v4bbs`;
CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=``@`` SQL SECURITY DEFINER VIEW `v4bbs` AS select `a`.`topic_id` AS `did`,`a`.`topic_type` AS `topic_type`,`a`.`especial_flag` AS `topic_level`,`a`.`title` AS `title`,`a`.`url` AS `url`,`a`.`content` AS `content`,concat(`b`.`chinese_name`,_utf8' ',`c`.`chinese_name`,_utf8' ',`d`.`chinese_name`) AS `addr`,`a`.`author_id` AS `author_id`,`e`.`nikename` AS `author_nick`,`a`.`appear_date` AS `pub_time`,`a`.`restor_count` AS `reply`,`a`.`last_restor_user_id` AS `last_reply_id`,`a`.`last_restor_nickName` AS `last_reply_nick`,`a`.`last_restor_date` AS `last_reply_time`,`a`.`last_update_date` AS `last_modify_time`,`a`.`fingerprint` AS `fp` from ((((`tb4topic` `a` join `tb4position` `b`) join `tb4position` `c`) join `tb4position` `d`) join `tb4user` `e`) where ((`a`.`pos_id_1` = `b`.`position_id`) and (`a`.`pos_id_2` = `c`.`position_id`) and (`a`.`pos_id_3` = `d`.`position_id`) and (`a`.`author_id` = `e`.`user_id`) and ((`a`.`state` = 1) or (`a`.`state` = 2)));

应该改成:

    DROP VIEW IF EXISTS `testdb`.`v4bbs`;
CREATE VIEW `v4bbs` AS select `a`.`topic_id` AS `did`,`a`.`topic_type` AS `topic_type`,`a`.`especial_flag` AS `topic_level`,`a`.`title` AS `title`,`a`.`url` AS `url`,`a`.`content` AS `content`,concat(`b`.`chinese_name`,_utf8' ',`c`.`chinese_name`,_utf8' ',`d`.`chinese_name`) AS `addr`,`a`.`author_id` AS `author_id`,`e`.`nikename` AS `author_nick`,`a`.`appear_date` AS `pub_time`,`a`.`restor_count` AS `reply`,`a`.`last_restor_user_id` AS `last_reply_id`,`a`.`last_restor_nickName` AS `last_reply_nick`,`a`.`last_restor_date` AS `last_reply_time`,`a`.`last_update_date` AS `last_modify_time`,`a`.`fingerprint` AS `fp` from ((((`tb4topic` `a` join `tb4position` `b`) join `tb4position` `c`) join `tb4position` `d`) join `tb4user` `e`) where ((`a`.`pos_id_1` = `b`.`position_id`) and (`a`.`pos_id_2` = `c`.`position_id`) and (`a`.`pos_id_3` = `d`.`position_id`) and (`a`.`author_id`

mysql错误-UncategorizedSQLException 1449

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
连上MySQL,执行Create Database 命令时,报如下错误: can t create database (errno:28) 网上查询
一 环境:windows7+Mysql5.5.9+Navicat for MySQL(8) 二 在Navicat中添加连接时测试报错,错误代码 1
在登陆umail时.登陆某一个用户.有出现下面的错误提示. Fatal error: Uncaught exception 'PDOExcept
重启了一次服务器后,使用> mysql -u root -p登陆是出现下面的错误: ERROR 2002 (HY000): Can't
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号