我一直在互联网上搜索在 MacOs 苹果硅芯片(基于 Arm 的处理器)中安装 sqlplus 的最佳方法。请指导我一些最简单的方法来做到这一点。
我看到很多关于在基于 x64 intel 的处理器中安装 sqlplus 的文章,但没有在基于 arm64 的处理器上安装 sqlplus。
有关系统的更多详细信息
芯片 Apple M1 Pro Mac OS 版本 Mac OS Sonoma 14.3.1
我一直在互联网上搜索在 MacOs 苹果硅芯片(基于 Arm 的处理器)中安装 sqlplus 的最佳方法。请指导我一些最简单的方法来做到这一点。
我看到很多关于在基于 x64 intel 的处理器中安装 sqlplus 的文章,但没有在基于 arm64 的处理器上安装 sqlplus。
有关系统的更多详细信息
芯片 Apple M1 Pro Mac OS 版本 Mac OS Sonoma 14.3.1
我根据@Erwin Brandstetter 的答案提出了以下查询来获取表名称、index_type、operator_classes 和索引的唯一性:
SELECT i.indrelid::regclass::text AS table
, c.relname AS index_name
, a.amname AS index_type
, opc.operator_classes
, i.indisunique AS is_unique
, array_agg(att.attname) as column_names
FROM pg_catalog.pg_namespace n
JOIN pg_catalog.pg_class c ON c.relnamespace = n.oid
JOIN pg_catalog.pg_attribute att ON att.attrelid = c.oid
JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid
JOIN pg_catalog.pg_am a ON a.oid = c.relam
CROSS JOIN LATERAL (
SELECT ARRAY (SELECT opc.opcname
FROM unnest(i.indclass::oid[]) WITH ORDINALITY o(oid, ord)
JOIN pg_opclass opc ON opc.oid = o.oid
ORDER BY o.ord)
) opc(operator_classes)
WHERE n.nspname !~ '^pg_'
AND c.relkind = ANY (ARRAY['r', 't', 'i'])
group by
i.indrelid, c.relname, a.amname, opc.operator_classes, i.indisunique
ORDER BY 1, 2, 3, 4;
这非常有效,只是当通过转换另一列的数据创建索引时它会返回错误的列名称。例如,具有以下索引:
CREATE INDEX _ixtr_luxury_inventory_images ON public.luxury_inventory
USING gin (f_textarr2text(images) gin_trgm_ops)
返回:
table | luxury_inventory
index_name | _ixtr_luxury_inventory_images
index_type | gin
operator_classes | ['gin_trgm_ops']
is_unique | False
column_names | ['f_textarr2text']
我们得到f_textarr2text
作为列名称而不是images
。
我们怎样才能得到正确的column_names?如果这很重要的话,我正在使用 Postgres 16.2。
更新:这是建表SQL:
create table "luxury_inventory" (
id bigserial primary key,
images text[])
CREATE OR REPLACE FUNCTION "public".f_textarr2text(text[])
RETURNS text LANGUAGE sql IMMUTABLE AS $$SELECT array_to_string($1, ',')$$;
使用以下命令以 postgres “自定义”格式origin
转储数据库:pg_dump -d origin --data-only -Fc > file.dump
然后使用转储来恢复具有相同表名的不同数据库中的所有数据,如origin
db. 命令:pg_restore -l -d target --verbose -Fc file.dump
。
;
; Archive created at 2024-03-19 14:00:10 UTC
; dbname: origin
; TOC Entries: 215
; Compression: 0
; Dump Version: 1.13-0
; Format: CUSTOM
; Integer: 4 bytes
; Offset: 8 bytes
; Dumped from database version: 11.18 (Ubuntu 11.18-1.pgdg18.04+1)
; Dumped by pg_dump version: 11.18 (Ubuntu 11.18-1.pgdg18.04+1)
;
;
; Selected TOC Entries:
;
5357; 0 0 ENCODING - ENCODING
5358; 0 0 STDSTRINGS - STDSTRINGS
5359; 0 0 SEARCHPATH - SEARCHPATH
5360; 1262 16387 DATABASE - origin userA
5361; 0 0 DATABASE PROPERTIES - origin userA
; depends on: 5360
5145; 0 730750 TABLE DATA subpartitions backends_y2024w03 userA
; depends on: 237
5166; 0 738268 TABLE DATA subpartitions backends_y2024w04 userA
; depends on: 258
5189; 0 745798 TABLE DATA subpartitions backends_y2024w05 userA
; depends on: 281
.........
depends on: xxx
注释,而目标数据库中不存在这些注释。将转储转换为纯 SQL 文件,仅包含诸如 之类的命令COPY subpartitions.backends_y2024w03 ("time", dbname, data, tag_data) FROM stdin;
,导入所有数据,没有任何问题。问题:如何检测丢失的实体,恢复“自定义”备份文件时指的depends on: xxx
是什么以及如何禁用这些检查?(因为示例中存在所有真正的依赖项)xxx
我有一个带有两个实体的 .NET WebApi(请原谅这些愚蠢的名称,这只是一个示例):
public class Father
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public int? ChildAId { get; set; }
public int? ChildBId { get; set; }
public int? ChildCId { get; set; }
public int? ChildDId { get; set; }
public int? ChildEId { get; set; }
public int? ChildFId { get; set; }
public int? ChildGId { get; set; }
public int? ChildHId { get; set; }
public int? ChildIId { get; set; }
public int? ChildJId { get; set; }
public int? ChildKId { get; set; }
public int? ChildLId { get; set; }
public int? ChildMId { get; set; }
public int? ChildNId { get; set; }
public int? ChildOId { get; set; }
public int? ChildPId { get; set; }
public int? ChildQId { get; set; }
public int? ChildRId { get; set; }
public int? ChildSId { get; set; }
public int? ChildTId { get; set; }
public int? ChildUId { get; set; }
public int? ChildVId { get; set; }
public int? ChildWId { get; set; }
public int? ChildXId { get; set; }
public int? ChildYId { get; set; }
public int? ChildZId { get; set; }
public int? Child0Id { get; set; }
public int? Child1Id { get; set; }
public int? Child2Id { get; set; }
public int? Child3Id { get; set; }
public int? Child4Id { get; set; }
public int? Child5Id { get; set; }
public int? Child6Id { get; set; }
public int? Child7Id { get; set; }
public int? Child8Id { get; set; }
public int? Child9Id { get; set; }
public Child? ChildA { get; set; }
public Child? ChildB { get; set; }
public Child? ChildC { get; set; }
public Child? ChildD { get; set; }
public Child? ChildE { get; set; }
public Child? ChildF { get; set; }
public Child? ChildG { get; set; }
public Child? ChildH { get; set; }
public Child? ChildI { get; set; }
public Child? ChildJ { get; set; }
public Child? ChildK { get; set; }
public Child? ChildL { get; set; }
public Child? ChildM { get; set; }
public Child? ChildN { get; set; }
public Child? ChildO { get; set; }
public Child? ChildP { get; set; }
public Child? ChildQ { get; set; }
public Child? ChildR { get; set; }
public Child? ChildS { get; set; }
public Child? ChildT { get; set; }
public Child? ChildU { get; set; }
public Child? ChildV { get; set; }
public Child? ChildW { get; set; }
public Child? ChildX { get; set; }
public Child? ChildY { get; set; }
public Child? ChildZ { get; set; }
public Child? Child0 { get; set; }
public Child? Child1 { get; set; }
public Child? Child2 { get; set; }
public Child? Child3 { get; set; }
public Child? Child4 { get; set; }
public Child? Child5 { get; set; }
public Child? Child6 { get; set; }
public Child? Child7 { get; set; }
public Child? Child8 { get; set; }
public Child? Child9 { get; set; }
}
public class Child
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
}
我插入了 100,000 个父亲和他们的孩子。现在我尝试使用 EF Core 从数据库中恢复它们(但 PgAdmin 给出了相同的结果)。
20 名有限制/抵消的父亲
SELECT f."Id", f."Child0Id", f."Child1Id", f."Child2Id", f."Child3Id", f."Child4Id", f."Child5Id", f."Child6Id", f."Child7Id", f."Child8Id", f."Child9Id", f."ChildAId", f."ChildBId", f."ChildCId", f."ChildDId", f."ChildEId", f."ChildFId", f."ChildGId", f."ChildHId", f."ChildIId", f."ChildJId", f."ChildKId", f."ChildLId", f."ChildMId", f."ChildNId", f."ChildOId", f."ChildPId", f."ChildQId", f."ChildRId", f."ChildSId", f."ChildTId", f."ChildUId", f."ChildVId", f."ChildWId", f."ChildXId", f."ChildYId", f."ChildZId", f."Name"
FROM "Father" AS f
LIMIT 20 OFFSET 98000
查询在 130 毫秒内完成
20 位父亲及其所有孩子和限制/抵消
SELECT t."Id", t."Child0Id", t."Child1Id", t."Child2Id", t."Child3Id", t."Child4Id", t."Child5Id", t."Child6Id", t."Child7Id", t."Child8Id", t."Child9Id", t."ChildAId", t."ChildBId", t."ChildCId", t."ChildDId", t."ChildEId", t."ChildFId", t."ChildGId", t."ChildHId", t."ChildIId", t."ChildJId", t."ChildKId", t."ChildLId", t."ChildMId", t."ChildNId", t."ChildOId", t."ChildPId", t."ChildQId", t."ChildRId", t."ChildSId", t."ChildTId", t."ChildUId", t."ChildVId", t."ChildWId", t."ChildXId", t."ChildYId", t."ChildZId", t."Name", c."Id", c."Description", c."Name", c0."Id", c0."Description", c0."Name", c1."Id", c1."Description", c1."Name", c2."Id", c2."Description", c2."Name", c3."Id", c3."Description", c3."Name", c4."Id", c4."Description", c4."Name", c5."Id", c5."Description", c5."Name", c6."Id", c6."Description", c6."Name", c7."Id", c7."Description", c7."Name", c8."Id", c8."Description", c8."Name", c9."Id", c9."Description", c9."Name", c10."Id", c10."Description", c10."Name", c11."Id", c11."Description", c11."Name", c12."Id", c12."Description", c12."Name", c13."Id", c13."Description", c13."Name", c14."Id", c14."Description", c14."Name", c15."Id", c15."Description", c15."Name", c16."Id", c16."Description", c16."Name", c17."Id", c17."Description", c17."Name", c18."Id", c18."Description", c18."Name", c19."Id", c19."Description", c19."Name", c20."Id", c20."Description", c20."Name", c21."Id", c21."Description", c21."Name", c22."Id", c22."Description", c22."Name", c23."Id", c23."Description", c23."Name", c24."Id", c24."Description", c24."Name", c25."Id", c25."Description", c25."Name", c26."Id", c26."Description", c26."Name", c27."Id", c27."Description", c27."Name", c28."Id", c28."Description", c28."Name", c29."Id", c29."Description", c29."Name", c30."Id", c30."Description", c30."Name", c31."Id", c31."Description", c31."Name", c32."Id", c32."Description", c32."Name", c33."Id", c33."Description", c33."Name", c34."Id", c34."Description", c34."Name"
FROM (
SELECT f."Id", f."Child0Id", f."Child1Id", f."Child2Id", f."Child3Id", f."Child4Id", f."Child5Id", f."Child6Id", f."Child7Id", f."Child8Id", f."Child9Id", f."ChildAId", f."ChildBId", f."ChildCId", f."ChildDId", f."ChildEId", f."ChildFId", f."ChildGId", f."ChildHId", f."ChildIId", f."ChildJId", f."ChildKId", f."ChildLId", f."ChildMId", f."ChildNId", f."ChildOId", f."ChildPId", f."ChildQId", f."ChildRId", f."ChildSId", f."ChildTId", f."ChildUId", f."ChildVId", f."ChildWId", f."ChildXId", f."ChildYId", f."ChildZId", f."Name"
FROM "Father" AS f
LIMIT 20 OFFSET 98000
) AS t
LEFT JOIN "Child" AS c ON t."ChildAId" = c."Id"
LEFT JOIN "Child" AS c0 ON t."ChildBId" = c0."Id"
LEFT JOIN "Child" AS c1 ON t."ChildCId" = c1."Id"
LEFT JOIN "Child" AS c2 ON t."ChildDId" = c2."Id"
LEFT JOIN "Child" AS c3 ON t."ChildEId" = c3."Id"
LEFT JOIN "Child" AS c4 ON t."ChildFId" = c4."Id"
LEFT JOIN "Child" AS c5 ON t."ChildGId" = c5."Id"
LEFT JOIN "Child" AS c6 ON t."ChildHId" = c6."Id"
LEFT JOIN "Child" AS c7 ON t."ChildIId" = c7."Id"
LEFT JOIN "Child" AS c8 ON t."ChildJId" = c8."Id"
LEFT JOIN "Child" AS c9 ON t."ChildKId" = c9."Id"
LEFT JOIN "Child" AS c10 ON t."ChildLId" = c10."Id"
LEFT JOIN "Child" AS c11 ON t."ChildMId" = c11."Id"
LEFT JOIN "Child" AS c12 ON t."ChildNId" = c12."Id"
LEFT JOIN "Child" AS c13 ON t."ChildOId" = c13."Id"
LEFT JOIN "Child" AS c14 ON t."ChildPId" = c14."Id"
LEFT JOIN "Child" AS c15 ON t."ChildQId" = c15."Id"
LEFT JOIN "Child" AS c16 ON t."ChildRId" = c16."Id"
LEFT JOIN "Child" AS c17 ON t."ChildSId" = c17."Id"
LEFT JOIN "Child" AS c18 ON t."ChildTId" = c18."Id"
LEFT JOIN "Child" AS c19 ON t."ChildUId" = c19."Id"
LEFT JOIN "Child" AS c20 ON t."ChildVId" = c20."Id"
LEFT JOIN "Child" AS c21 ON t."ChildWId" = c21."Id"
LEFT JOIN "Child" AS c22 ON t."ChildXId" = c22."Id"
LEFT JOIN "Child" AS c23 ON t."ChildYId" = c23."Id"
LEFT JOIN "Child" AS c24 ON t."ChildZId" = c24."Id"
LEFT JOIN "Child" AS c25 ON t."Child0Id" = c25."Id"
LEFT JOIN "Child" AS c26 ON t."Child1Id" = c26."Id"
LEFT JOIN "Child" AS c27 ON t."Child2Id" = c27."Id"
LEFT JOIN "Child" AS c28 ON t."Child3Id" = c28."Id"
LEFT JOIN "Child" AS c29 ON t."Child4Id" = c29."Id"
LEFT JOIN "Child" AS c30 ON t."Child5Id" = c30."Id"
LEFT JOIN "Child" AS c31 ON t."Child6Id" = c31."Id"
LEFT JOIN "Child" AS c32 ON t."Child7Id" = c32."Id"
LEFT JOIN "Child" AS c33 ON t."Child8Id" = c33."Id"
LEFT JOIN "Child" AS c34 ON t."Child9Id" = c34."Id"
查询在 300 毫秒内完成
根据 ID 确定的单亲父亲(限制由单一默认设置)
SELECT f."Id", f."Child0Id", f."Child1Id", f."Child2Id", f."Child3Id", f."Child4Id", f."Child5Id", f."Child6Id", f."Child7Id", f."Child8Id", f."Child9Id", f."ChildAId", f."ChildBId", f."ChildCId", f."ChildDId", f."ChildEId", f."ChildFId", f."ChildGId", f."ChildHId", f."ChildIId", f."ChildJId", f."ChildKId", f."ChildLId", f."ChildMId", f."ChildNId", f."ChildOId", f."ChildPId", f."ChildQId", f."ChildRId", f."ChildSId", f."ChildTId", f."ChildUId", f."ChildVId", f."ChildWId", f."ChildXId", f."ChildYId", f."ChildZId", f."Name"
FROM "Father" AS f
WHERE f."Id" = 1
LIMIT 2
查询在 115 毫秒内完成
现在问题来了:单亲父亲和所有孩子的身份证件(由单一默认设置的限制)
SELECT f."Id", f."Child0Id", f."Child1Id", f."Child2Id", f."Child3Id", f."Child4Id", f."Child5Id", f."Child6Id", f."Child7Id", f."Child8Id", f."Child9Id", f."ChildAId", f."ChildBId", f."ChildCId", f."ChildDId", f."ChildEId", f."ChildFId", f."ChildGId", f."ChildHId", f."ChildIId", f."ChildJId", f."ChildKId", f."ChildLId", f."ChildMId", f."ChildNId", f."ChildOId", f."ChildPId", f."ChildQId", f."ChildRId", f."ChildSId", f."ChildTId", f."ChildUId", f."ChildVId", f."ChildWId", f."ChildXId", f."ChildYId", f."ChildZId", f."Name", c."Id", c."Description", c."Name", c0."Id", c0."Description", c0."Name", c1."Id", c1."Description", c1."Name", c2."Id", c2."Description", c2."Name", c3."Id", c3."Description", c3."Name", c4."Id", c4."Description", c4."Name", c5."Id", c5."Description", c5."Name", c6."Id", c6."Description", c6."Name", c7."Id", c7."Description", c7."Name", c8."Id", c8."Description", c8."Name", c9."Id", c9."Description", c9."Name", c10."Id", c10."Description", c10."Name", c11."Id", c11."Description", c11."Name", c12."Id", c12."Description", c12."Name", c13."Id", c13."Description", c13."Name", c14."Id", c14."Description", c14."Name", c15."Id", c15."Description", c15."Name", c16."Id", c16."Description", c16."Name", c17."Id", c17."Description", c17."Name", c18."Id", c18."Description", c18."Name", c19."Id", c19."Description", c19."Name", c20."Id", c20."Description", c20."Name", c21."Id", c21."Description", c21."Name", c22."Id", c22."Description", c22."Name", c23."Id", c23."Description", c23."Name", c24."Id", c24."Description", c24."Name", c25."Id", c25."Description", c25."Name", c26."Id", c26."Description", c26."Name", c27."Id", c27."Description", c27."Name", c28."Id", c28."Description", c28."Name", c29."Id", c29."Description", c29."Name", c30."Id", c30."Description", c30."Name", c31."Id", c31."Description", c31."Name", c32."Id", c32."Description", c32."Name", c33."Id", c33."Description", c33."Name", c34."Id", c34."Description", c34."Name"
FROM "Father" AS f
LEFT JOIN "Child" AS c ON f."ChildAId" = c."Id"
LEFT JOIN "Child" AS c0 ON f."ChildBId" = c0."Id"
LEFT JOIN "Child" AS c1 ON f."ChildCId" = c1."Id"
LEFT JOIN "Child" AS c2 ON f."ChildDId" = c2."Id"
LEFT JOIN "Child" AS c3 ON f."ChildEId" = c3."Id"
LEFT JOIN "Child" AS c4 ON f."ChildFId" = c4."Id"
LEFT JOIN "Child" AS c5 ON f."ChildGId" = c5."Id"
LEFT JOIN "Child" AS c6 ON f."ChildHId" = c6."Id"
LEFT JOIN "Child" AS c7 ON f."ChildIId" = c7."Id"
LEFT JOIN "Child" AS c8 ON f."ChildJId" = c8."Id"
LEFT JOIN "Child" AS c9 ON f."ChildKId" = c9."Id"
LEFT JOIN "Child" AS c10 ON f."ChildLId" = c10."Id"
LEFT JOIN "Child" AS c11 ON f."ChildMId" = c11."Id"
LEFT JOIN "Child" AS c12 ON f."ChildNId" = c12."Id"
LEFT JOIN "Child" AS c13 ON f."ChildOId" = c13."Id"
LEFT JOIN "Child" AS c14 ON f."ChildPId" = c14."Id"
LEFT JOIN "Child" AS c15 ON f."ChildQId" = c15."Id"
LEFT JOIN "Child" AS c16 ON f."ChildRId" = c16."Id"
LEFT JOIN "Child" AS c17 ON f."ChildSId" = c17."Id"
LEFT JOIN "Child" AS c18 ON f."ChildTId" = c18."Id"
LEFT JOIN "Child" AS c19 ON f."ChildUId" = c19."Id"
LEFT JOIN "Child" AS c20 ON f."ChildVId" = c20."Id"
LEFT JOIN "Child" AS c21 ON f."ChildWId" = c21."Id"
LEFT JOIN "Child" AS c22 ON f."ChildXId" = c22."Id"
LEFT JOIN "Child" AS c23 ON f."ChildYId" = c23."Id"
LEFT JOIN "Child" AS c24 ON f."ChildZId" = c24."Id"
LEFT JOIN "Child" AS c25 ON f."Child0Id" = c25."Id"
LEFT JOIN "Child" AS c26 ON f."Child1Id" = c26."Id"
LEFT JOIN "Child" AS c27 ON f."Child2Id" = c27."Id"
LEFT JOIN "Child" AS c28 ON f."Child3Id" = c28."Id"
LEFT JOIN "Child" AS c29 ON f."Child4Id" = c29."Id"
LEFT JOIN "Child" AS c30 ON f."Child5Id" = c30."Id"
LEFT JOIN "Child" AS c31 ON f."Child6Id" = c31."Id"
LEFT JOIN "Child" AS c32 ON f."Child7Id" = c32."Id"
LEFT JOIN "Child" AS c33 ON f."Child8Id" = c33."Id"
LEFT JOIN "Child" AS c34 ON f."Child9Id" = c34."Id"
WHERE f."Id" = 1
LIMIT 2
查询在两秒多内完成!2300毫秒
有人可以解释一下为什么以及如何优化这个查询吗?我有所有 PK 和 FK 的索引。
我有一个配置有 pgbackrest 的 postgresql 数据库用于备份。它保留完整备份 7 天:
[global]
repo1-retention-full-type=time
repo1-retention-full=7
我已将 cron 设置为在周日创建完整备份,并每天进行增量备份。这将按预期工作,并在最近的备份超过 7 天后删除完整备份。实际的 crontab 调用一个使用 pgbackrest 命令的脚本,但为了简单起见:
0 0 * * 0 root pgbackrest --type=full backup
0 0 * * 1-6 root pgbackrest backup
我希望将 pgbackrest 配置为每 7 天自动创建一次完整备份,这样我只需要一个 cron 作业:
0 0 * * * root pgbackrest backup
这可能吗,还是我必须在脚本中编写一些 bash 逻辑?
我有多个时间序列表,timestamp
列上有 Pkey。
BRIN
如果我将索引更改为 而非 ,我想测试性能改进BTREE
。
然而,我还想对该timestamp
列有一个唯一的约束(据我所知是基于BTREE
)。
我有什么选择?
BRIN
索引吗BTREE
?在这种情况下,在搜索/连接期间将选择哪个索引?UNIQUE
约束吗?在这种情况下,它将如何运作?我的使用场景是,我需要在timestamp
列上运行 FULL OUTER JOIN,以便从多个表一起进行查询,这些查询有时可能会运行 30 分钟或更长时间。
今天早上,我对数据库执行了差异备份,名为“MW”。现在我需要在另一个名为“bak_MW”的数据库上恢复备份(完整+差异)。
我尝试使用完整备份+差异备份恢复数据库时遇到错误。
错误是:
数据库“bak_MW”恢复失败。(Microsoft.SqlServer.Management.RelationalEngineTasks)
- - - - - - - - - - - - - - - 附加信息:
System.Data.SqlClient.SqlError:备份集保存了现有“bak_MW”数据库以外的数据库的备份。(Microsoft.SqlServer.SmoExtended)
我认为该错误与完整备份的源文件错误有关。某些进程制作的完整备份比我的更新。
如何获取 MSSQL Backup 引用的文件名以进行完整备份?
有没有办法找到执行的完整备份的日志以及目标文件路径?
谢谢。
我尝试安装两个 mongo 节点,每个节点位于不同的位置,延迟较低。架构应该是:
一个节点位于 DC,另一个节点位于 DR。假设一次只有一个节点是主节点(DC 中的节点),如果 DC 宕机,DR 中的节点可以成为主节点(可以手动将其提议为主节点)。
当 DR 中的节点被手动更改为主节点时,我可以有时间再次启动 DC 中的节点,等待数据同步到 DC,然后降级 DR 中的节点,再次将 DC 中的节点更改为主节点。
我不确定副本集是否可以应用于此。请帮我解决这个问题。
谢谢。
每当在架构“A”中创建新表时,我都需要在架构“B”中复制该表。这应该会自动发生。我搜索过触发器概念,但它不适用于“CREATE”或“ALTER”语句等 DDL 语句。如何在没有触发器的情况下实现这一点?请帮帮我。
不幸的是,我没有在 MySQL Workbench 8.0.26 上使用备份(数据导出)过程创建“转储”文件。
当我将旧数据库文件复制到新数据目录时,服务器无法启动并显示以下消息:
Could not connect to MySQL: Can't connect to MySQL server on 'localhost' (10061) (code 2003)
尝试在 Windows Web Server 2008 R2 上全新安装 MySQL Server 8.0.26 和 Workbench 8.0.26。安装MySQL服务器后工作正常。但是当我停止服务器并将旧数据库文件复制到新数据目录中时,MySQL 服务器无法启动。尽管我读到这不是“备份”和恢复 MySQL 数据库的常用方法,但我之前并没有意识到这一点。
有没有办法将旧数据库文件转换为 MySQL Workbench 之外的“转储”文件?或者有什么方法可以将旧的 MySQL 数据库文件导入到新数据库中,而不会使 MySQL 服务器再次启动失败?
谢谢。