报错: schema product_db refered by user app_imooc is not exist!

来源:5-17 MHA架构实例演示(2)

慕标4577186

2020-09-25

server.xml
[root@node1 conf]# cat server.xml

<?xml version="1.0" encoding="UTF-8"?>

<mycat:server xmlns:mycat=“http://io.mycat/”>

8066
9066
0
1
0
0
2
false
0
0
1
64k
1k
0
384m
false
utf8
2
8
1800000
300
104857600
100


1
bDbWr7bVMgszTe82oMo8NaUsmFFdPCNl/lYXzOYoG8anTpQLvdx5e+LYJEmT0IAeSVp1loyxSZPyv1GoHbHFHg==
order_db,product_db,customer_db

</mycat:server>

#########################################################

cat schema.xml

<?xml version="1.0"?>

<mycat:schema xmlns:mycat=“http://io.mycat/”>

<schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100">
	<table name="order_master"            primaryKey="order_id"          dataNode="order"/>
	<table name="order_detail"            primaryKey="order_detail_id"   dataNode="order"/>
	<table name="order_cart"              primaryKey="cart_id"           dataNode="order"/>
	<table name="order_customer_addr"     primaryKey="customer_addr_id"  dataNode="order"/>
	<table name="region_info"             primaryKey="region_id"         dataNode="order"/>
	<table name="shipping_info"           primaryKey="ship_id"           dataNode="order"/>

	<table name="product_brand_info"      primaryKey="brand_id"           dataNode="prodb"/>
	<table name="product_category"        primaryKey="category_id"        dataNode="prodb"/>
	<table name="product_comment"         primaryKey="comment_id"         dataNode="prodb"/>
	<table name="product_info"            primaryKey="product_id"         dataNode="prodb"/>
	<table name="product_pic_info"        primaryKey="product_pic_id"     dataNode="prodb"/>
	<table name="product_supplier_info"   primaryKey="supplier_id"        dataNode="prodb"/>

	<table name="customer_balance_log"   primaryKey="balance_id"          dataNode="custdb"/>
	<table name="customer_inf"           primaryKey="customer_inf_id"     dataNode="custdb"/>
	<table name="customer_level_inf"     primaryKey="customer_level"      dataNode="custdb"/>
	<table name="customer_login"         primaryKey="customer_id"         dataNode="custdb"/>
	<table name="customer_login_log"     primaryKey="login_id"            dataNode="custdb"/>
	<table name="customer_point_log"     primaryKey="point_id"            dataNode="custdb"/>
</schema>


<dataNode name="order"  dataHost="mysql42" database="order_db" />
<dataNode name="prodb"  dataHost="mysql43" database="product_db" />
<dataNode name="custdb" dataHost="mysql44" database="customer_db" />


<dataHost name="mysql42" maxCon="1000" minCon="10" balance="3"   writeType="0" 
         dbType="mysql" dbDriver="native" switchType="1">
	<heartbeat>select user()</heartbeat>
	<writeHost host="192.168.3.142" url="192.168.3.142:3306" user="im_mycat"  password="123456"/>
</dataHost>

<dataHost name="mysql43" maxCon="1000" minCon="10" balance="3"   writeType="0" 
         dbType="mysql" dbDriver="native" switchType="1">
	<heartbeat>select user()</heartbeat>
	<writeHost host="192.168.3.143" url="192.168.3.143:3306" user="im_mycat"  password="123456"/>
</dataHost>

<dataHost name="mysql44" maxCon="1000" minCon="10" balance="3"   writeType="0" 
         dbType="mysql" dbDriver="native" switchType="1">
	<heartbeat>select user()</heartbeat>
	<writeHost host="192.168.3.144" url="192.168.3.144:3306" user="im_mycat"  password="123456"/>
</dataHost>

</mycat:schema>

请老师帮忙看一下,谢谢。

写回答

1回答

sqlercn

2020-09-26

你在schema.xml中并没有定义product_db这个逻辑数据库。

0
0

MySQL提升课程 全面讲解MySQL架构设计

面面俱到讲解影响MySQL性能的各个因素,让MySQL架构了然于胸。

4419 学习 · 547 问题

查看课程