mysql

Posted LUPENG

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql相关的知识,希望对你有一定的参考价值。

https://183.56.162.38/dana/home/index.cgi

[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
server_id=5
binlog-ignore-db=mysql
log-bin=mysql-slave-bin
binlog_cache_size=1M
binlog_format=mixed
expire_logs_days=7
slave_skip_errors=1062
relay_log=mysql-relay-bin
log_slave_updates=1
read_only=1

 

 

schema.xml

<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">

<schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="test"></schema>
<dataNode name="test" dataHost="localhost1" database="quartzdb" />
<dataHost name="localhost1" maxCon="1000" minCon="10" balance="0"
writeType="0" dbType="mysql" dbDriver="native" switchType="1" slaveThreshold="100">
<heartbeat>select user()</heartbeat>
<!-- can have multi write hosts -->
<writeHost host="hostM1" url="172.17.0.1:3306" user="root"
password="lupeng">
<!-- can have multi read hosts -->
<readHost host="hostS2" url="172.17.0.1:3307" user="root" password="lupeng" />
</writeHost>

</dataHost>
</mycat:schema>


































以上是关于mysql的主要内容,如果未能解决你的问题,请参考以下文章

MySQLMySQL 一些 使用 案例

MySQL的常用操作更改root密码连接MySQLMySQL常用的命令

MySQLMysql必会语句

MySQLMysql必会语句

MySQLMysql必会语句

mysqlmysql优化