[mysqld] # set basedir to your installation path basedir=D:/mysql/mysql-5.7.23-winx64 # set datadir to the location of your data directory datadir=D:/mysql/mysql-5.7.23-winx64/data
[mysqld] # 指定端口 port=3307 # set basedir to your installation path basedir=D:/mysql/mysql-5.7.23-winx64-3307 # set datadir to the location of your data directory datadir=D:/mysql/mysql-5.7.23-winx64-3307/data
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | | test | | wwh | +--------------------+ 6 rows in set (0.00 sec)
mysql> status; -------------- mysql Ver 14.14 Distrib 5.7.23, for Win64 (x86_64)
Connection id: 2 Current database: Current user: root@localhost SSL: Not in use Using delimiter: ; Server version: 5.7.23 MySQL Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: gbk Conn. characterset: gbk TCP port: 3307 Uptime: 7 min 37 sec
show binlog events\G
show master status\G
查询命令
在master上查看当前有多少个从节点
1 2
select * from information_schema.processlist as p where p.command = 'Binlog Dump';