`

mysql错误-UncategorizedSQLException 1449

 
阅读更多

错误:

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`

分享到:
评论

相关推荐

    cxf-systests-uncategorized-2.6.12.zip

    kmf-media-api.zip,Kurento媒体管理器API

    cxf-systests-uncategorized-2.5.9.zip

    degen.zip,下载maven mojo并将非maven项目“退化”为源代码和二进制文件

    java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

    java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK ……

    helppc reference library

    一本全面的关于IBM PC基本器件及编程的详细手册(英文)。 BIOS开发和操作系统开发必读材料。...Uncategorized/Miscellaneous Topics Tables and Formats used by DOS & BIOS Graphical ASCII table from QBasic

    pb9.0+SQL2000 执行自动备份的步骤

    pb9.0+SQL2000 执行自动备份的步骤 --SQL 执行自动备份的步骤 -- 创建 自动备份存储过程 ...IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'[Uncategorized (Local)]') < 1 ..................

    SPRING API 2.0.CHM

    All Classes AbstractAdvisorAutoProxyCreator AbstractApplicationContext AbstractApplicationEventMulticaster AbstractAspectJAdvice AbstractAspectJAdvisorFactory AbstractAspectJAdvisorFactory....

    编程用等宽字体roman-mono接替Fixedsys用于Microsoft Visual Studio 2010

    Mark.Hui 2010.9.19 roman-mono 编程专用等...演绎自http://www.fonts101.com/fonts/view/Uncategorized/33688/Romanmonoregular.aspx 和http://www.fonts101.com/fonts/view/Uncategorized/33686/Romanmonobold.aspx

    tauri-react-example:Ta小Tauri React实例壮举。 沟通

    Tauri React示例 与运行的简单入门程序。 希望应该节省一些时间来尝试设置Tauri和React。 当前已配置为以模式运行。发展yarn dev生产yarn tauri:build在Windows上进行调试安装 。 确保已安装Edge Legacy。...

    WordPress 博客下载插件Download Monitor

    show_uncategorized (integer) – 设置为1(默认)显示未分类内容,设置为0则不显示 per_page (integer) – 每页显示的下载条数,默认为20 format – 使用自定义输出样式的ID exclude – 禁止显示的下载,以逗号...

    jquery 插件开发 extjs中的extend用法小结

    代码如下: var start = { id: 123, count: 41, desc: ‘this is information’, title: ‘Base Object’, tag: ‘uncategorized’, values: [1,1,2,3,5,8,13]}; var more = { name: ‘Los Techies’, tag: ...

    jQuery 3D圆盘旋转焦点图 支持鼠标滚轮

    之前我们分享过很多炫酷实用的jQuery焦点图插件了,今天介绍的这款jQuery焦点图非常特别,所有图片围成一个圆圈,组成一个立体视觉的圆盘,并且可以旋转选择圆盘中的图片。另外,这款jQuery 3D圆盘旋转焦点图插件还...

    jQuery交互式分享按钮 可横向展开

    之前我们为大家分享过很多炫酷的分享按钮了,比如纯CSS3实现分享按钮 包含常用社交网站按钮和HTML5/CSS3社会化分享按钮,都不仅很漂亮,而且都非常实用。这次要给大家介绍一款基于jQuery的交互式分享按钮,它的特点...

    tidymail:用于维护和整理我的Gmail收件箱的Python脚本

    在脚本中编辑UNCATEGORIZED_LABEL_ID变量,然后运行python inboxcleaner.py 。 该脚本采用最简单的方法,通过搜索来自给定发件人的电子邮件并将邮件移到电子邮件最多的标签上,来猜测应将电子邮件移至哪个文件夹。 ...

Global site tag (gtag.js) - Google Analytics