mycat报错,求助!!大佬们

各位大神,mycat报错,我第一次用,启动后,启动日志中记录报错,看都看不懂,求助,我是学php的?谢谢谢谢!!!!!

    ![图片说明](https://img-ask.csdn.net/upload/201810/09/1539075815_748826.png)![图片说明](https://img-ask.csdn.net/upload/201810/09/1539082851_872071.png)

1个回答

看不到你的图,请重新贴图。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

mycat链接oracle报错 未找到from关键字

在用mycat链接oracle的时候报错 ![图片说明](https://img-ask.csdn.net/upload/201803/14/1521018472_125236.png) 他应该是链接的时候执行了一个查询的sql语句 [node=dn1{select timediff( curtime(), utc_time() )}, 但是这个语句在oracle里面是错误的 怎么破。 源码里也搜索不到这个语句。 不过这个链接报错跳过去不管他的话实际上已经连上数据库了。 但是每次链接总这么报错也不好吧。 难道是mycat的缺陷?不兼容其他数据库?

MySQL8.0用命令连8066端口(mycat)报错提示密码错误,但是Navicat可以连接上8066端口的.

1.Navicat可以成功连接上8066端口,如图: ![图片说明](https://img-ask.csdn.net/upload/201908/15/1565841087_268450.png) 2.但是用cmd命令就报密码错误,如图:![图片说明](https://img-ask.csdn.net/upload/201908/15/1565841217_158931.png) 3.已经把mycat的属性作了修改: checkSQLschema="true";dbDriver="jdbc"; url="jdbc:mysql://192.168.1.108:3306?useSSL=false&useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC" 哪里出问题了呢?

在使用mycat时,建表报错:No MyCAT Database selected

![图片说明](https://img-ask.csdn.net/upload/201711/02/1509611540_232729.png)在使用mycat时,建表报错:No MyCAT Database selected

mycat 启动成功,连接不上

mycat 启动日志 ![图片说明](https://img-ask.csdn.net/upload/201706/30/1498791674_843625.png) 账号:![图片说明](https://img-ask.csdn.net/upload/201706/30/1498791722_389590.png) 报错: mycat 启动日志 账号 连接错误: An error occurred while establishing the connection: Long Message: Access denied for user 'jierlu' Details: Type: java.sql.SQLException Error Code: 1045 SQL State: 28000 急求答案。。。

springboot 连接mycat 报 Connection is read-only

使用springboot连接mycat(底层是oracle), 查询数据正常,在写入数据的时候报 Caused by: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed 请各位大侠帮忙看看,是否在配置文件中要加点什么,事务配置有尝试过,没有什么用。用mysql客户端操作同一个用户,是可以正常读写,配置文件如下: spring: http: multipart: enabled: true max-file-size: 3000MB max-request-size: 900000MB datasource: read-only: false url: jdbc:mysql://172.18.58.188:8066/abmdb11 username: test password: ENC(7BjKLN7o22PyA0JTSu/KhA==) driver-class-name: com.mysql.jdbc.Driver type: org.apache.tomcat.jdbc.pool.DataSource tomcat: validation-query: select * from dual jpa: show-sql: true database-platform: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: none

MyCat作为数据库中间件时,sql中字符串包含@@会偶现报表不存在的错误

[SQL]select * from `tbl_caseinfo` where caseName = 'tset1@@' [Err] 1146 - Table 'dbjadcase.tbl_caseinfo' doesn't exist 有时会报上述错误,而有时又可以正常查询。 查了下mycat文档,发现@@是命令字符,不知道是不是与此有关。偶尔又查询成功,考虑是不是和mycat分片规则有关。 朋友们可以试一下,看看有没有什么合适的解决方案。

mysql服务启动报错1607 求助大神!

错误日志: InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 160817 17:41:01 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 160817 17:41:02 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 10 MB InnoDB: Database physically writes the file full: wait... 160817 17:41:02 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 10 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 160817 17:41:03 InnoDB: Started; log sequence number 0 0 160817 17:41:03 [Note] E:\mysqlserver\bin\mysqld-nt: ready for connections. Version: '5.0.22-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL) 160826 16:38:33 [Note] E:\mysqlserver\bin\mysqld-nt: Normal shutdown 160826 16:38:35 InnoDB: Starting shutdown... 160826 16:38:38 InnoDB: Shutdown completed; log sequence number 0 133556 160826 16:38:38 [Note] E:\mysqlserver\bin\mysqld-nt: Shutdown complete 160826 16:40:24 InnoDB: Started; log sequence number 0 133556 160826 16:40:25 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 17:28:58 InnoDB: Started; log sequence number 0 133556 160827 17:28:58 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:25:59 InnoDB: Started; log sequence number 0 133556 160827 19:25:59 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:26:03 InnoDB: Started; log sequence number 0 133556 160827 19:26:03 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:26:07 InnoDB: Started; log sequence number 0 133556 160827 19:26:07 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:32:24 InnoDB: Started; log sequence number 0 133556 160827 19:32:24 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:36:18 InnoDB: Started; log sequence number 0 133556 160827 19:36:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:37:25 InnoDB: Started; log sequence number 0 133556 160827 19:37:26 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:40:55 InnoDB: Started; log sequence number 0 133556 160827 19:40:55 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 160827 19:50:49 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 160827 19:50:49 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 10 MB InnoDB: Database physically writes the file full: wait... 160827 19:50:50 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 10 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 160827 19:50:50 InnoDB: Started; log sequence number 0 0 160827 19:50:50 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:50:55 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 160827 19:50:55 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 160827 19:50:55 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 160827 19:50:56 InnoDB: Started; log sequence number 0 43655 160827 19:50:56 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 19:58:23 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 160827 19:58:23 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 160827 19:58:23 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 160827 19:58:24 InnoDB: Started; log sequence number 0 43655 160827 19:58:24 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist InnoDB: The first specified data file .\ibdata1 did not exist: InnoDB: a new database to be created! 160827 20:00:24 InnoDB: Setting file .\ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 160827 20:00:24 InnoDB: Log file .\ib_logfile0 did not exist: new to be created InnoDB: Setting log file .\ib_logfile0 size to 10 MB InnoDB: Database physically writes the file full: wait... 160827 20:00:24 InnoDB: Log file .\ib_logfile1 did not exist: new to be created InnoDB: Setting log file .\ib_logfile1 size to 10 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 160827 20:00:25 InnoDB: Started; log sequence number 0 0 160827 20:00:25 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 20:01:54 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 160827 20:01:54 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 160827 20:01:54 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 160827 20:01:55 InnoDB: Started; log sequence number 0 43655 160827 20:01:55 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 20:02:09 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 160827 20:02:09 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 160827 20:02:09 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 160827 20:02:10 InnoDB: Started; log sequence number 0 43655 160827 20:02:10 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160827 21:37:52 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 160827 21:37:52 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 36808. InnoDB: Doing recovery: scanned up to log sequence number 0 43655 160827 21:37:52 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 160827 21:37:52 InnoDB: Started; log sequence number 0 43655 160827 21:37:52 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

mysql启动失败,求助!!!!!!!

[root@localhost log]# service mysql start Starting MySQL...The server quit without updating PID file [失败]/mysql/localhost.pid).

使用navicat/sqlyog操作mycat创建配置文件中的表时 出现以下问题

![图片说明](https://img-ask.csdn.net/upload/202004/05/1586091588_669628.png)![图片说明](https://img-ask.csdn.net/upload/202004/05/1586091612_365571.png) 第一个图是navicat报错 [Err] 1184 - Invalid DataSource:0 第二个是sqlyog报错 错误代码: 1064 op table not in schema----'C1_GOODS' 我的schema.xml文件中是配置了c1_goods的 不过是小写 改成大写问题依然存在 请问这是为什么啊

mycat 配置 不能操作数据库

对t_user的主键user_id进行水平分表,希望t_user中的数据能放在不同的数据库,在配置启动mycat后,使用mysql客户端连接选择表时,报错 ![图片说明](https://img-ask.csdn.net/upload/201605/03/1462261859_333608.png) ,其中schema.xml的配置文件如下![图片说明](https://img-ask.csdn.net/upload/201605/03/1462261873_8893.png)请大家能帮忙看下

mycat连接mysql8提示密码错误

指令如下: [root@localhost bin]# mysql -utestuser -p -P8066 -h127.0.0.1 -DTESTDB --default_auth=mysql_native_password Enter password: ERROR 1045 (HY000): Access denied for user 'testuser', because password is error 直接用mysql连接是对的。 配置文件也都改了。 补充:mycat的server.xml文件,user name=“root”这里,改了名字,mycat就启动不了,用root就可以启动,为什么?

mycat 插入数据而且主键自增的时候 报错java.lang.RuntimeException: can't fetch sequnce in db,sequnce :AP_SHOW_BEHAVIOR detail:null

``` jvm 1 | HEIMA RULE INFO [0-1]-[{1}] jvm 1 | 2020-05-10 15:15:48,837 [ERROR][$_NIOREACTOR-0-RW] BatchInsertSequence.route(......) java.lang.RuntimeException: can't fetch sequnce in db,sequnce :AP_SHOW_BEHAVIOR detail:null jvm 1 | at io.mycat.route.sequence.handler.IncrSequenceMySQLHandler.getSeqValueFromDB(IncrSequenceMySQLHandler.java:125) jvm 1 | at io.mycat.route.sequence.handler.IncrSequenceMySQLHandler.nextId(IncrSequenceMySQLHandler.java:94) jvm 1 | at io.mycat.route.sequence.BatchInsertSequence.route(BatchInsertSequence.java:118) jvm 1 | at io.mycat.route.handler.HintCatletHandler.route(HintCatletHandler.java:54) jvm 1 | at io.mycat.route.RouteService.route(RouteService.java:119) jvm 1 | at io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:273) jvm 1 | at io.mycat.server.ServerConnection.execute(ServerConnection.java:222) jvm 1 | at io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:136) jvm 1 | at io.mycat.net.FrontendConnection.query(FrontendConnection.java:317) jvm 1 | at io.mycat.net.FrontendConnection.query(FrontendConnection.java:337) jvm 1 | at io.mycat.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71) jvm 1 | at io.mycat.net.FrontendConnection.rawHandle(FrontendConnection.java:478) jvm 1 | at io.mycat.net.FrontendConnection.handle(FrontendConnection.java:460) jvm 1 | at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:321) jvm 1 | at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190) jvm 1 | at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:273) jvm 1 | at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102) jvm 1 | at java.lang.Thread.run(Thread.java:748) jvm 1 | (io.mycat.route.sequence.BatchInsertSequence:BatchInsertSequence.java:128) ``` 在liunx跑出现这样的问题 找了很久不知道什么问题

MyCat实现多租户时使用ThreadLoacl碰到的问题

使用mycat实现多租户为每个用户分表时,我想用ThreadLoacl来保存每个用户对应的数据库下面是我的Threadlocal工具类 public class ThreadLocalUtil { private static ThreadLocal<String> tenanThreadLocal; private static ThreadLocal getThreadLocal(){ if(tenanThreadLocal==null){ synchronized(ThreadLocalUtil.class){ if(tenanThreadLocal==null){ tenanThreadLocal =new ThreadLocal<>(); } }} return tenanThreadLocal; } public static synchronized void setTenant(String scheme) { getThreadLocal().set(scheme); } public static final synchronized String getTenant() { if(getThreadLocal().get()==null){ synchronized(ThreadLocalUtil.class){ if(getThreadLocal().get()==null){ return "TESTDB"; } } } return getThreadLocal().get().toString(); } } 但是我在获取到用户对应的scheme以后需要进行多线程下的其他操作,这个时候其他线程里面得ThreadLocal就为空了 ![图片说明](https://img-ask.csdn.net/upload/201710/20/1508479232_724404.png) 求大神指导一下我怎么在当前用户的所有线程内继续使用此ThreadLocal而其他用户登陆后再更新一个Threadlocal呢

通过mycat向mysql 插入二进制数据 出现错误

使用的是flask_sqlalchemy连接的mycat。直接连接mysql没有问题 模型代码 class UserTable(db.Model): __table_args__ = { 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8', 'mysql_row_format': 'dynamic' } username = db.Column(db.String(80), unique=False,nullable=True) email = db.Column(db.String(320), nullable=True) password = db.Column(db.Binary(32), nullable=True)#这个字段出现错误 key = db.Column(db.String(32), primary_key=True,nullable=False, unique=True) token_key = db.Column(db.String(32), nullable=True, unique=True) # 用户登录成功后 返回给浏览器 last_login_time = db.Column(db.DateTime, nullable=True) role = db.Column(db.Integer) remember_me = db.Column(db.Boolean, nullable=False)#是否记住 如果记住 则15天过期 没有则半个小时过期 active = db.Column(db.Boolean)#是否激活 email_active = db.Column(db.Boolean)#邮箱是否激活 email_verification_code = db.Column(db.String(16), nullable=True) email_verification_code_sent_time = db.Column(db.DateTime, nullable=True) 插入的是加密过后的二进制数据 我对比过直接在mysql 和 通过my cat发送到mysql的建表语句 是一样。 password字段是tinyblob(建表语句里) 所以问题在使用mycat插入该数据的时候 比如是16位的二进制数据。 再通过mycat取出来二进制数据变成32位的了 应该和数据库版本没有关系 我试过了5.6和5.7都有这个问题

Mycat load data infile总是失败,不知道什么原因,求大神解答

mycat采用load data infile方法数据迁移,过程中报错,日志如下: 2017-12-01 11:48:39.919 WARN [$_NIOREACTOR-2-RW] (io.mycat.net.NIOReactor$RW.run(NIOReactor.java:107)) - caught err: java.lang.NullPointerException at io.mycat.net.AbstractConnection.checkWriteBuffer(AbstractConnection.java:456) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.mysql.BinaryPacket.write(BinaryPacket.java:68) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.LoadDataUtil.writeToBackConnection(LoadDataUtil.java:94) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.LoadDataUtil.requestFileDataResponse(LoadDataUtil.java:50) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.handler.MultiNodeQueryHandler.requestDataResponse(MultiNodeQueryHandler.java:734) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handleRequestPacket(MySQLConnectionHandler.java:179) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handleData(MySQLConnectionHandler.java:101) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.handler.BackendAsyncHandler.offerData(BackendAsyncHandler.java:36) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handle(MySQLConnectionHandler.java:80) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.handle(AbstractConnection.java:263) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:321) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:273) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102) ~[Mycat-server-1.6-RELEASE.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_80] 2017-12-01 11:48:39.948 INFO [$_NIOREACTOR-2-RW] (io.mycat.net.AbstractConnection.close(AbstractConnection.java:508)) - close connection,reason:program err:java.lang.NullPointerException ,MySQLConnection [id=6, lastTime=1512100119275, user=root, schema=log_db_2017-11, old shema=log_db_2017-11, borrowed=true, fromSlaveDB=false, threadId=58, charset=gbk, txIsolation=3, autocommit=true, attachment=dn8{LOAD DATA LOCAL INFILE 'C:\\Users\\User\\Desktop\\log_file_manage_4-9.txt' INTO TABLE log_file_manage CHARACTER SET 'utf8' COLUMNS ESCAPED BY '%' (`uuid`, `client_number`, `customer_id`, `decode_flag`, `analysis_flag`, `file_name`, `file_path`, `upload_time`, `sys_number`, `sys_name`, `sys_path`, `sys_version`, `result`, `operate_time`, `line_begin`, `line_end`, `vdi_info`)}, respHandler=io.mycat.backend.mysql.nio.handler.MultiNodeQueryHandler@4c156b4b, host=localhost, port=3306, statusSync=io.mycat.backend.mysql.nio.MySQLConnection$StatusSync@12372ff3, writeQueue=0, modifiedSQLExecuted=true] 2017-12-01 11:48:40.254 WARN [$_NIOREACTOR-2-RW] (io.mycat.net.NIOReactor$RW.run(NIOReactor.java:107)) - caught err: java.lang.NullPointerException at io.mycat.net.AbstractConnection.writeToBuffer(AbstractConnection.java:475) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.write(AbstractConnection.java:417) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.LoadDataUtil.requestFileDataResponse(LoadDataUtil.java:62) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.handler.MultiNodeQueryHandler.requestDataResponse(MultiNodeQueryHandler.java:734) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handleRequestPacket(MySQLConnectionHandler.java:179) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handleData(MySQLConnectionHandler.java:101) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.handler.BackendAsyncHandler.offerData(BackendAsyncHandler.java:36) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.backend.mysql.nio.MySQLConnectionHandler.handle(MySQLConnectionHandler.java:80) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.handle(AbstractConnection.java:263) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:321) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:273) ~[Mycat-server-1.6-RELEASE.jar:?] at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102) ~[Mycat-server-1.6-RELEASE.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_80] 哪位大神能帮忙看看,不尽感谢。

navicat 导入了链接文件以后因为链接的是mycat 双击打开表的时候回多一个库.表报错如何解决

![双击打开时候有这样的错误](https://img-ask.csdn.net/upload/201809/20/1537411693_540949.png) ![直接写sql 是没问题的](https://img-ask.csdn.net/upload/201809/20/1537411750_830553.png) !直接写sql 查询的结果](https://img-ask.csdn.net/upload/201809/20/1537411814_973184.png)

关于mycat的连接问题?

server.xml配置了这么一段: <user name="root"> <property name="password">digdeep</property> <property name="schemas">TESTDB</property> </user> <user name="user"> <property name="password">user</property> <property name="schemas">TESTDB</property> <property name="readOnly">true</property> </user> 为什么我使用user,user能连接到mycat,而使用root,digdeep连接不到mycat呢? 两个都配置了账号密码,且配置是差不多的呀!这是怎么回事,求mycat大神告知,谢谢。

mycat 调用存储过程 出现问题。

使用mycat实现读写分离 ,简单查询没有问题,命令行中调用存储过程会返回结果但不结束查询。需要按ctrl+c才能中止,并且java后台调用时不返回查询结果。 ![图片说明](https://img-ask.csdn.net/upload/201902/18/1550476695_611838.png) 现在已有数据库hostM1(作为主数据库)和hostS2(作为从数据库),以通过mysql自带的功能实现主从复制,现mycat的配置如下: **server.xml :** ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mycat:server SYSTEM "server.dtd"> <mycat:server xmlns:mycat="http://io.mycat/"> <system> <property name="useSqlStat">0</property> <!-- 1为开启实时统计、0为关闭 --> <property name="useGlobleTableCheck">0</property> <!-- 1为开启全加班一致性检测、0为关闭 --> <property name="sequnceHandlerType">2</property> <property name="processorBufferPoolType">0</property> <property name="handleDistributedTransactions">0</property> <property name="useOffHeapForMerge">1</property> <property name="memoryPageSize">1m</property> <property name="spillsFileBufferSize">1k</property> <property name="useStreamOutput">0</property> <property name="systemReserveMemorySize">384m</property> <property name="useZKSwitch">true</property> </system> <user name="csuser"> <property name="password">cspassword</property> <property name="schemas">csdb</property> </user> </mycat:server> ``` **schema.xml:** ``` <?xml version="1.0"?> <!DOCTYPE mycat:schema SYSTEM "schema.dtd"> <mycat:schema xmlns:mycat="http://io.mycat/"> <schema name="csuser" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1"> </schema> <dataNode name="dn1" dataHost="localhost1" database="csdb" /> <dataHost name="localhost1" maxCon="1000" minCon="10" balance="3" writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100"> <heartbeat>select user()</heartbeat> <writeHost host="hostM1" url="" user="" password=""> <readHost host="hostS2" url="" user="" password="" /> </writeHost> </dataHost> </mycat:schema> ``` **测试用存储过程test_prock()** ``` CREATE PROCEDURE `test_prock`() BEGIN SELECT title FROM wx_article_title; END ``` 执行存储过程 ``` /*!mycat:db_type=master*/call test_prock(); ``` **rule.xml**(没有配置分片) ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mycat:rule SYSTEM "rule.dtd"> <mycat:rule xmlns:mycat="http://io.mycat/"> <tableRule name="rule1"> <rule> <columns>id</columns> <algorithm>func1</algorithm> </rule> </tableRule> <tableRule name="rule2"> <rule> <columns>user_id</columns> <algorithm>func1</algorithm> </rule> </tableRule> <tableRule name="sharding-by-intfile"> <rule> <columns>sharding_id</columns> <algorithm>hash-int</algorithm> </rule> </tableRule> <tableRule name="auto-sharding-long"> <rule> <columns>id</columns> <algorithm>rang-long</algorithm> </rule> </tableRule> <tableRule name="mod-long"> <rule> <columns>id</columns> <algorithm>mod-long</algorithm> </rule> </tableRule> <tableRule name="sharding-by-murmur"> <rule> <columns>id</columns> <algorithm>murmur</algorithm> </rule> </tableRule> <tableRule name="crc32slot"> <rule> <columns>id</columns> <algorithm>crc32slot</algorithm> </rule> </tableRule> <tableRule name="sharding-by-month"> <rule> <columns>create_time</columns> <algorithm>partbymonth</algorithm> </rule> </tableRule> <tableRule name="latest-month-calldate"> <rule> <columns>calldate</columns> <algorithm>latestMonth</algorithm> </rule> </tableRule> <tableRule name="auto-sharding-rang-mod"> <rule> <columns>id</columns> <algorithm>rang-mod</algorithm> </rule> </tableRule> <tableRule name="jch"> <rule> <columns>id</columns> <algorithm>jump-consistent-hash</algorithm> </rule> </tableRule> <function name="murmur" class="io.mycat.route.function.PartitionByMurmurHash"> <property name="seed">0</property><!-- 默认是0 --> <property name="count">2</property><!-- 要分片的数据库节点数量,必须指定,否则没法分片 --> <property name="virtualBucketTimes">160</property><!-- 一个实际的数据库节点被映射为这么多虚拟节点,默认是160倍,也就是虚拟节点数是物理节点数的160倍 --> </function> <function name="crc32slot" class="io.mycat.route.function.PartitionByCRC32PreSlot"> <property name="count">2</property><!-- 要分片的数据库节点数量,必须指定,否则没法分片 --> </function> <function name="hash-int" class="io.mycat.route.function.PartitionByFileMap"> <property name="mapFile">partition-hash-int.txt</property> </function> <function name="rang-long" class="io.mycat.route.function.AutoPartitionByLong"> <property name="mapFile">autopartition-long.txt</property> </function> <function name="mod-long" class="io.mycat.route.function.PartitionByMod"> <!-- how many data nodes --> <property name="count">3</property> </function> <function name="func1" class="io.mycat.route.function.PartitionByLong"> <property name="partitionCount">8</property> <property name="partitionLength">128</property> </function> <function name="latestMonth" class="io.mycat.route.function.LatestMonthPartion"> <property name="splitOneDay">24</property> </function> <function name="partbymonth" class="io.mycat.route.function.PartitionByMonth"> <property name="dateFormat">yyyy-MM-dd</property> <property name="sBeginDate">2015-01-01</property> </function> <function name="rang-mod" class="io.mycat.route.function.PartitionByRangeMod"> <property name="mapFile">partition-range-mod.txt</property> </function> <function name="jump-consistent-hash" class="io.mycat.route.function.PartitionByJumpConsistentHash"> <property name="totalBuckets">3</property> </function> </mycat:rule> ```

mycat做读写分离,读写都分发到写服务器上,为毛啊?

<schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1"> </schema> <dataNode name="dn1" dataHost="localhost1" database="test" /> <dataHost name="localhost1" maxCon="1000" minCon="10" balance="3" writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100"> <heartbeat>show slave status</heartbeat> <!-- can have multi write hosts --> <writeHost host="hostM1" url="localhost:3306" user="root" password=""> <!-- can have multi read hosts --> <readHost host="hostS2" url="localhost:3307" user="root" password="" /> </writeHost> <!-- <writeHost host="hostM2" url="localhost:3316" user="root" password="123456"/> --> </dataHost>

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c# 解析cad c#数字格式化万 c#int转byte c#格式化日期 c# wpf 表格 c# 实现ad域验证登录 c#心跳包机制 c#使用fmod.dll c#dll vb 调用 c# outlook
立即提问
相关内容推荐