小编nel*_*aro的帖子

还原压缩的 MySQL 转储时禁用二进制日志记录

我正忙于构建现有数据库的从属。我不希望它在将从属设备与主设备处于相同状态之前为我导入的数据构建 bin 日志。

这主要是为了节省导入 100 G 数据的空间。

mysqldump somelargedb | gzip > /somewhere/withspace/dump/somelargedb.sql.gz
Run Code Online (Sandbox Code Playgroud)

未压缩的此文件在 100 Gb 范围内。压缩后大约为 2Gb

mysql replication mysqldump

6
推荐指数
2
解决办法
7230
查看次数

SQL_SLAVE_SKIP_COUNTER = 1 失败,设置@@gtid_slave_pos 用于跳过给定的 GTID 位置

我最近打破了复制,当我试图通过一个不正确的交易时。我得到了以下内容。

MariaDB [(none)]> STOP SLAVE;
Query OK, 0 rows affected (0.05 sec)

MariaDB [(none)]> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
ERROR 1966 (HY000): When using parallel replication and GTID with multiple replication domains, @@sql_slave_skip_counter cannot be used. Instead, setting @@gtid_slave_pos explicitly can be used to skip to after a given GTID position.
MariaDB [(none)]> select @@gtid_slave_pos;
+---------------------------------------------+
| @@gtid_slave_pos                            |
+---------------------------------------------+
| 0-1051-1391406,1-1050-1182069,57-1051-98897 |
+---------------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> show variables like '%_pos%';
+----------------------+---------------------------------------------------------+
| Variable_name        | …
Run Code Online (Sandbox Code Playgroud)

mysql replication mariadb gtid

6
推荐指数
1
解决办法
5317
查看次数

MySQL 无法在 Arch Linux 上启动。致命错误:无法打开和锁定权限表:表 'mysql.user' 不存在

MySQL 无法在 Arch Linux 上启动。

mysqld[3440]: [Note] /usr/bin/mysqld (mysqld 10.1.22-MariaDB) starting as process 3440 ...
mysqld[3440]: [Note] InnoDB: Using mutexes to ref count buffer pool pages
mysqld[3440]: [Note] InnoDB: The InnoDB memory heap is disabled
mysqld[3440]: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysqld[3440]: [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysqld[3440]: [Note] InnoDB: Compressed tables use zlib 1.2.11
mysqld[3440]: [Note] InnoDB: Using Linux native AIO
mysqld[3440]: [Note] InnoDB: Using SSE crc32 instructions
mysqld[3440]: [Note] …
Run Code Online (Sandbox Code Playgroud)

mysql linux installation mariadb-10.1

4
推荐指数
1
解决办法
2万
查看次数

如何向 mariadb / mysql 中的现有表添加分区?

我有下表。

我也想加分区。

CREATE TABLE `app_log_Test` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `dateCreated` datetime NOT NULL,
  `host` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `label` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `event` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `level` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message` text COLLATE utf8mb4_unicode_ci,
  `version` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `app_log_dateCreated` (`dateCreated`),
  KEY `app_log_label` (`label`),
  KEY `app_log_event` (`event`),
  KEY `app_log_level` (`level`)
) ENGINE=TokuDB `COMPRESSION`=tokudb_quicklz
Run Code Online (Sandbox Code Playgroud)

我正在使用 MariaDB 10。

MariaDB [test2]> alter table app_log_Test partition by RANGE(TO_DAYS(dateCreated))(
-> PARTITION …
Run Code Online (Sandbox Code Playgroud)

mysql mariadb partitioning tokudb

3
推荐指数
1
解决办法
1万
查看次数