2021年7月

ORACLE 导出excle文件结果

由 wukaiqiang创建, 最后修改于大约1分钟以前MySQL实现Oracle的spool功能Oracle中:sqlplus> Spool C:\temp\table_namessqlplus> select table_name from user_tables;sqlplus> spool off;MySQL中:mysql> tee c:\trash\qwe.txtmysql> show tables;mysql> notee或C:MySQL\MySQL Server\bin>mysql -u root -p --tee=c:\tras...

mysql 主从复制错误

Replica Errors During ReplicationIf a statement produces the same error (identical error code) on both the source and the replica, the error is logged, but replication continues.主从都出现相同的错误,同步继续If a statement produces different errors on the source and the replica, the replication SQL thread termi...

mysql 主从详细介绍

原理:Replication is based on the replication source server keeping track of all changes to its databases (updates, deletes, and so on) in its binary log. The binary log serves as a written record of all events that modify database structure or content (data) from the moment the server was started. ...

mysql 查看数据库表容量大小

1.查看所有数据库容量大小selecttable_schema as '数据库',sum(table_rows) as '记录数',sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)',sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'from information_schema.tablesgroup by table_schemaorder by sum(data_length) desc, sum(index_length) desc;  2.查看所有数据库各表容量大小...