Mycat-Server
Mycat-Server copied to clipboard
1.6.6.1 connect with MySQL8,ERROR 1184 (HY000): Invalid DataSource:0
ENVIRONMENT:
MYSQL_VERSION=8.0.17-1debian9 MYCAT_VERSION=5.6.29-mycat-1.6.6.1-release-20181031195535 MyCat Server (OpenCloudDB)
CONFIGURATION:
schema.xml:
<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
<schema name="test" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1"></schema>
<dataNode name="dn1" dataHost="host1" database="test" />
<dataHost name="host1" maxCon="1000" minCon="10" balance="1" writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<writeHost host="hostMW" url="127.0.0.1:33061" user="root" password="root">
<readHost host="hostMR" url="127.0.0.1:33061" user="root" password="root" />
</writeHost>
<writeHost host="hostSW" url="127.0.0.1:33062" user="root" password="root" >
<readHost host="hostSR" url="127.0.0.1:33062" user="root" password="root" />
</writeHost>
</dataHost>
</mycat:schema>
server.xml:
<system>
<property name="nonePasswordLogin">0</property>
<property name="useHandshakeV10">1</property>
<property name="useSqlStat">0</property>
<property name="useGlobleTableCheck">0</property>
<property name="sequnceHandlerType">2</property>
<property name="subqueryRelationshipCheck">false</property>
<property name="serverPort">8066</property>
<property name="managerPort">9066</property>
<property name="handleDistributedTransactions">0</property>
<property name="useOffHeapForMerge">1</property>
<property name="memoryPageSize">64k</property>
<property name="spillsFileBufferSize">1k</property>
<property name="useStreamOutput">0</property>
<property name="systemReserveMemorySize">384m</property>
<property name="useZKSwitch">false</property>
</system>
<user name="root" defaultAccount="true">
<property name="password">root</property>
<property name="schemas">test</property>
</user>
<user name="repl">
<property name="password">repl</property>
<property name="schemas">test</property>
<property name="readOnly">true</property>
</user>
ERROR:
[root@TEST-APP ~]# mysql -u root -p -P 8066 -h 47.*.*.*
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.29-mycat-1.6.6.1-release-20181031195535 MyCat Server (OpenCloudDB)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test;
Database changed
mysql> select 1;
ERROR 1184 (HY000): Invalid DataSource:0
mysql>
DESCRIPTION:
I've connected both mysql servers using navicat 12, all going well. When tried to use mycat, the problem came up.
mycat连不上mysql
尝试改一下mysql8的认证方式
@junwen12221 尝试使用mysql_native_password方式进行认证
在mysqld.conf中增加了最后一行来指定默认认证插件
[mysqld]
server-id=1
default-authentication-plugin=mysql_native_password
重启后,再次访问mycat,错误信息换成了ERROR 1184 (HY000): Invalid DataSource:1
[root@TEST-APP ~]# mysql -u root -p -P 8066 -h 47.*.*.*
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.6.29-mycat-1.6.6.1-release-20181031195535 MyCat Server (OpenCloudDB)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test;
Database changed
mysql> select 1;
ERROR 1184 (HY000): Invalid DataSource:1
mysql>
我这里也遇到了同样的报错。
我的环境是mysql8.0.13+mycat1.6.7.1。
本次我从搭建成功mycat后就一直在报错,show tables返回
怀疑过是8.0密码认证改变引起的,但是之前的测试中没有遇到这样的问题。下面是我的配置文件
[root@MySQL05 mycat]# cat conf/schema.xml
<mycat:schema xmlns:mycat="http://io.mycat/">
<schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1" />
<dataNode name="dn1" dataHost="localhost1" database="course" />
<dataHost name="localhost1" maxCon="10" minCon="1" balance="1" writeType="0" dbType="mysql" dbDriver="native" switchType="1" >
[root@MySQL05 mycat]# cat conf/server.xml
.....................................................................................................................................
.......................................................................................................................................
........................................................................................................................................
<user name="root" defaultAccount="true">
<!-- 表级 DML 权限设置 -->
<!--
<privileges check="false">
<schema name="TESTDB" dml="0110" >
<table name="tb01" dml="0000"></table>
<table name="tb02" dml="1111"></table>
</schema>
</privileges>
-->
</user>
<user name="user">
<property name="password">user</property>
<property name="schemas">TESTDB</property>
<property name="readOnly">true</property>
</user>
</mycat:server>
奇怪的问题频出,例如,stop mycat时提示没有运行,但是我查看mycat是运行的。
你在连接mycat时应该使用这样的方式: mysql -h 127.0.0.1 -u root -P 8066 --default-auth=mysql_native_password -p
关于您提到的问题,我解决了,但是我不知道您的问题是否和我的一样,所以您通过这个命令看一下mycat的运行日志 cat mycat-03-16-1.log|grep error。将报错提供一下,我看看是否和我的一样。
Invalid DataSource:0 这个问题最后都是如何解决的
您好,您将github上的链接发我一下。
在 2020年5月28日,14:12,aslzl <[email protected]mailto:[email protected]> 写道:
Invalid DataSource:0 这个问题最后都是如何解决的
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/MyCATApache/Mycat-Server/issues/2303#issuecomment-635128007, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AODOS52QP5YH5IKTNCOQHK3RTX6FNANCNFSM4IT4CQPQ.
非常感谢,这个问题困扰我将近两天了,这是我的邮箱 [email protected] @guanhua-dba
请问解决了嘛我的也是mysql8.0遇到了这个问题
@guanhua-dba 同求。这个错误如何解决的??谢谢! [email protected]
请告知一下mycat和mysql版本号
请告知一下mycat和mysql版本号
请告知一下mycat和mysql版本号
请告知一下mycat和mysql版本号
请告知一下mycat和mysql版本号
您好,麻烦告诉一下MyCAT、MySQL使用的版本,以及MyCAT机器上使用的MySQL的环境,最后是 连接的命令提供一下。
你好,我这个问题后来解决了。我上次就回复你了。
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年4月12日(星期一) 下午2:47 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [MyCATApache/Mycat-Server] 1.6.6.1 connect with MySQL8,ERROR 1184 (HY000): Invalid DataSource:0 (#2303)
您好,麻烦告诉一下MyCAT、MySQL使用的版本,以及MyCAT机器上使用的MySQL的环境,最后是 连接的命令提供一下。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
抱歉,刚刚用的是全部回复,打扰您了。
699640 @.***> 于2021年4月12日周一 下午2:50写道:
你好,我这个问题后来解决了。我上次就回复你了。
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年4月12日(星期一) 下午2:47 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [MyCATApache/Mycat-Server] 1.6.6.1 connect with MySQL8,ERROR 1184 (HY000): Invalid DataSource:0 (#2303)
您好,麻烦告诉一下MyCAT、MySQL使用的版本,以及MyCAT机器上使用的MySQL的环境,最后是 连接的命令提供一下。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MyCATApache/Mycat-Server/issues/2303#issuecomment-817535575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AODOS5YE65TVHJC6HN2SH3DTIKJ3LANCNFSM4IT4CQPQ .
您好,请问怎么解决的,我也是这个问题
您好,请问怎么解决的,我也是这个问题,邮箱:[email protected]
报这个错是数据源链接补上,issue里面找下修改mysql8的密码格式;新人建议直接使用mycat2
用这种方式启动也不行:--default-auth=mysql_native_password my.cnf也改了密码加密方式
这么多人问,就没个解决方案吗