已有101人关注
Java开发实战宝典第22章的进销存管理系统添加信息只要是中文中乱码,且有错误提示?
发表在Java图书答疑 2010-07-24
是否精华
版块置顶:
Java开发实战宝典第22章的进销存管理系统添加信息只要是中文中乱码,且有错误提示?
1、添加信息只要是中文中乱码?
2、错误提示如下:
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.showDataToTable(CaigouDingdanChaxunFrame.java:147)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.formWindowOpened(CaigouDingdanChaxunFrame.java:258)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.access$0(CaigouDingdanChaxunFrame.java:256)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame$1.windowOpened(CaigouDingdanChaxunFrame.java:61)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
请问以上两个问题怎么解决啊? 
分享到:
精彩评论 1
绿草_mrkj
学分:0 LV1
2010-07-24
沙发
  请问你MySQL数据库采用什么字符编码?
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照