Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): make the instance form's user examples run on Oracle and MySQL 8.4 (#21569)

zchpeterae0343fa9637
diff --git a/frontend/src/components/instance/CreateDataSourceExample.test.tsx b/frontend/src/components/instance/CreateDataSourceExample.test.tsx
index 502f96f9c2..602569ee8c 100644
--- a/frontend/src/components/instance/CreateDataSourceExample.test.tsx
+++ b/frontend/src/components/instance/CreateDataSourceExample.test.tsx
@@ -1,5 +1,5 @@
import { cleanup, render, screen } from "@testing-library/react";
-import { afterEach, expect, test, vi } from "vitest";
+import { afterEach, describe, expect, test, vi } from "vitest";
import enUS from "@/locales/en-US.json";
import { Engine } from "@/types/proto-es/v1/common_pb";
import { DataSource_AuthenticationType, DataSourceType } from "@/types/proto-es/v1/instance_service_pb";
@@ -18,6 +18,9 @@ vi.mock("@/lib/clipboard", () => ({ writeTextToClipboard: vi.fn() }));
vi.mock("@/components/ui/copy-button", () => ({ CopyButton: () => null }));
afterEach(cleanup);
+const renderExample = (engine: Engine, dataSourceType: DataSourceType, authenticationType = DataSource_AuthenticationType.PASSWORD) =>
+ render(<CreateDataSourceExample engine={engine} dataSourceType={dataSourceType} authenticationType={authenticationType} createInstanceFlag={true} />).container.querySelector("pre")?.textContent ?? "";
+
test.each([
[Engine.TIDB, true],
[Engine.COCKROACHDB, false],
@@ -27,3 +30,42 @@ test.each([
expect(screen.getByText("This is the connection used by Bytebase to perform read-only operations such as SELECT query.")).toBeTruthy();
expect(screen.queryByText("Show how to create") !== null).toBe(hasExample);
});
+
+describe.each([
+ ["password", DataSource_AuthenticationType.PASSWORD],
+ ["AWS RDS IAM", DataSource_AuthenticationType.AWS_RDS_IAM],
+ ["Google Cloud SQL IAM", DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM],
+])("MySQL admin example with %s authentication", (_, authenticationType) => {
+ test("grants no privilege that only some MySQL versions accept", () => {
+ const example = renderExample(Engine.MYSQL, DataSourceType.ADMIN, authenticationType);
+ expect(example).toContain("ON *.* to bytebase@'%';");
+ expect(example).not.toMatch(/\/\*!|SET_USER_ID|SET_ANY_DEFINER|ALLOW_NONEXISTENT_DEFINER/);
+ });
+
+ test("warns that the definer privilege depends on the version and links to the MySQL docs", () => {
+ renderExample(Engine.MYSQL, DataSourceType.ADMIN, authenticationType);
+ expect(screen.getByRole("alert").textContent).toContain("also grant SET_USER_ID on MySQL 8.0 or SET_ANY_DEFINER on MySQL 8.4 and later.");
+ expect(screen.getByRole("link").getAttribute("href")).toBe("https://docs.bytebase.com/get-started/connect/mysql?source=console#create-a-user-for-bytebase");
+ });
+});
+
+test("Oracle admin example double-quotes the password and warns about Amazon RDS", () => {
+ expect(renderExample(Engine.ORACLE, DataSourceType.ADMIN)).toBe(
+ [
+ "-- Run in the database Bytebase connects to.",
+ "-- In a container database (CDB), that is the pluggable database, not the root.",
+ 'CREATE USER bytebase IDENTIFIED BY "YOUR_DB_PWD";',
+ "GRANT ALL PRIVILEGES TO bytebase;",
+ ].join("\n")
+ );
+ expect(screen.getByRole("alert").textContent).toContain("GRANT ALL PRIVILEGES doesn't work on Amazon RDS for Oracle.");
+ expect(screen.getByRole("link").getAttribute("href")).toBe("https://docs.bytebase.com/get-started/connect/oracle?source=console#create-a-user-for-bytebase");
+});
+
+test.each([
+ ["MySQL read-only", Engine.MYSQL, DataSourceType.READ_ONLY],
+ ["TiDB admin", Engine.TIDB, DataSourceType.ADMIN],
+])("shows no user setup warning for the %s example", (_, engine, dataSourceType) => {
+ expect(renderExample(engine as Engine, dataSourceType as DataSourceType)).not.toBe("");
+ expect(screen.queryByRole("alert")).toBeNull();
+});
diff --git a/frontend/src/components/instance/CreateDataSourceExample.tsx b/frontend/src/components/instance/CreateDataSourceExample.tsx
index e9a96b94af..3ffab0bcb5 100644
--- a/frontend/src/components/instance/CreateDataSourceExample.tsx
+++ b/frontend/src/components/instance/CreateDataSourceExample.tsx
@@ -1,5 +1,6 @@
import { useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
+import { LearnMoreLink } from "@/components/LearnMoreLink";
import { Alert } from "@/components/ui/alert";
import { CopyButton } from "@/components/ui/copy-button";
import {
@@ -28,19 +29,22 @@ function getGrantStatement(
): string {
if (dataSourceType === DataSourceType.ADMIN) {
const createUserStatement = `CREATE USER ${DATASOURCE_ADMIN_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';`;
+ // No definer privilege is valid on every MySQL version and cloud provider, so the
+ // example leaves it out and EngineSpecificWarning links to the per-version list.
+ const mysqlGrantStatement = `GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`;
switch (engine) {
case Engine.MYSQL:
if (
authenticationType ===
DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM
) {
- return `GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , SET_USER_ID */\nON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`;
+ return mysqlGrantStatement;
} else if (
authenticationType === DataSource_AuthenticationType.AWS_RDS_IAM
) {
- return `CREATE USER ${DATASOURCE_ADMIN_USER_NAME}@'%' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';\n\nALTER USER '${DATASOURCE_ADMIN_USER_NAME}'@'%' REQUIRE SSL;\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , SET_USER_ID */\nON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`;
+ return `CREATE USER ${DATASOURCE_ADMIN_USER_NAME}@'%' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';\n\nALTER USER '${DATASOURCE_ADMIN_USER_NAME}'@'%' REQUIRE SSL;\n\n${mysqlGrantStatement}`;
}
- return `${createUserStatement}\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , SET_USER_ID */\nON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`;
+ return `${createUserStatement}\n\n${mysqlGrantStatement}`;
case Engine.TIDB:
return `${createUserStatement}\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nLOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`;
case Engine.MARIADB:
@@ -173,7 +177,7 @@ function getGrantStatement(
case Engine.MSSQL:
return `-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.\nCREATE LOGIN ${DATASOURCE_ADMIN_USER_NAME} WITH PASSWORD = 'YOUR_DB_PWD';\nALTER SERVER ROLE sysadmin ADD MEMBER ${DATASOURCE_ADMIN_USER_NAME};`;
case Engine.ORACLE:
- return `-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.\nCREATE USER ${DATASOURCE_ADMIN_USER_NAME} IDENTIFIED BY 'YOUR_DB_PWD';\nGRANT ALL PRIVILEGES TO ${DATASOURCE_ADMIN_USER_NAME};`;
+ return `-- Run in the database Bytebase connects to.\n-- In a container database (CDB), that is the pluggable database, not the root.\nCREATE USER ${DATASOURCE_ADMIN_USER_NAME} IDENTIFIED BY "YOUR_DB_PWD";\nGRANT ALL PRIVILEGES TO ${DATASOURCE_ADMIN_USER_NAME};`;
}
} else {
const mysqlReadonlyStatement = `CREATE USER ${DATASOURCE_READONLY_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT SELECT, SHOW DATABASES, SHOW VIEW, USAGE ON *.* to ${DATASOURCE_READONLY_USER_NAME}@'%';`;
@@ -440,6 +444,40 @@ function EngineSpecificDescription({
return null;
}
+function EngineSpecificWarning({ engine }: { engine: Engine }) {
+ const { t } = useTranslation();
+
+ let message: string;
+ let docsPage: string;
+ switch (engine) {
+ case Engine.MYSQL:
+ message = t("instance.sentence.create-user-example.mysql.warn");
+ docsPage = "mysql";
+ break;
+ case Engine.ORACLE:
+ message = t("instance.sentence.create-user-example.oracle.warn");
+ docsPage = "oracle";
+ break;
+ default:
+ return null;
+ }
+
+ return (
+ <Alert
+ variant="warning"
+ className="mt-2"
+ description={
+ <>
+ {message}{" "}
+ <LearnMoreLink
+ href={`https://docs.bytebase.com/get-started/connect/${docsPage}?source=console#create-a-user-for-bytebase`}
+ />
+ </>
+ }
+ />
+ );
+}
+
export function CreateDataSourceExample({
engine,
dataSourceType,
@@ -509,6 +547,9 @@ export function CreateDataSourceExample({
className="-ml-px h-auto rounded-r-xs border border-control-border bg-control-bg/50 px-2 py-2 text-sm text-control-light hover:bg-control-bg focus:ring-control"
/>
</div>
+ {dataSourceType === DataSourceType.ADMIN && (
+ <EngineSpecificWarning engine={engine} />
+ )}
</div>
)}
</div>
diff --git a/frontend/src/components/instance/InfoPanel.test.tsx b/frontend/src/components/instance/InfoPanel.test.tsx
index b81f56740e..06920cd893 100644
--- a/frontend/src/components/instance/InfoPanel.test.tsx
+++ b/frontend/src/components/instance/InfoPanel.test.tsx
@@ -136,7 +136,68 @@ describe("InfoPanel i18n", () => {
render();
expect(container.querySelector("p")?.textContent).toBe(contentKey);
- expect(container.querySelector("a")?.textContent).toBe(linkTitleKey);
+ expect(container.querySelector("a.accent-link")?.textContent).toBe(
+ linkTitleKey
+ );
+
+ unmount();
+ });
+
+ test.each([
+ Engine.MYSQL,
+ Engine.TIDB,
+ Engine.MARIADB,
+ Engine.OCEANBASE,
+ ])("grants no privilege that only some versions accept for engine %s", async (engine) => {
+ const { InfoPanelContent } = await import("./InfoPanel");
+ const { container, render, unmount } = renderIntoContainer(
+ <InfoPanelContent engine={engine} section="authentication" />
+ );
+
+ render();
+
+ const code = container.querySelector("code")?.textContent ?? "";
+ expect(code).toContain("ON *.* to bytebase@'%';");
+ expect(code).not.toMatch(
+ /\/\*!|SET_USER_ID|SET_ANY_DEFINER|ALLOW_NONEXISTENT_DEFINER/
+ );
+
+ unmount();
+ });
+
+ test("warns about the MySQL definer privilege and links to the MySQL docs", async () => {
+ const { InfoPanelContent } = await import("./InfoPanel");
+ const { container, render, unmount } = renderIntoContainer(
+ <InfoPanelContent engine={Engine.MYSQL} section="authentication" />
+ );
+
+ render();
+
+ const alert = container.querySelector("[role=alert]");
+ expect(alert?.textContent).toContain(
+ "instance.sentence.create-user-example.mysql.warn"
+ );
+ expect(alert?.querySelector("a")?.getAttribute("href")).toBe(
+ "https://docs.bytebase.com/get-started/connect/mysql?source=console#create-a-user-for-bytebase"
+ );
+
+ unmount();
+ });
+
+ test.each([
+ Engine.TIDB,
+ Engine.MARIADB,
+ Engine.OCEANBASE,
+ ])("shows no MySQL definer warning for engine %s", async (engine) => {
+ const { InfoPanelContent } = await import("./InfoPanel");
+ const { container, render, unmount } = renderIntoContainer(
+ <InfoPanelContent engine={engine} section="authentication" />
+ );
+
+ render();
+
+ expect(container.querySelector("code")).not.toBeNull();
+ expect(container.querySelector("[role=alert]")).toBeNull();
unmount();
});
diff --git a/frontend/src/components/instance/InfoPanel.tsx b/frontend/src/components/instance/InfoPanel.tsx
index 5c9d936d0b..1f53fe0ae1 100644
--- a/frontend/src/components/instance/InfoPanel.tsx
+++ b/frontend/src/components/instance/InfoPanel.tsx
@@ -3,6 +3,8 @@ import { X } from "lucide-react";
import type { ReactNode } from "react";
import { useCallback, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
+import { LearnMoreLink } from "@/components/LearnMoreLink";
+import { Alert } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { CopyButton } from "@/components/ui/copy-button";
import {
@@ -19,6 +21,7 @@ import {
type InfoSnippet,
type InfoSnippetContentKey,
type InfoSnippetLinkTitleKey,
+ type InfoSnippetWarningKey,
} from "./info-content";
interface InfoPanelProps {
@@ -156,6 +159,17 @@ export function InfoPanelContent({ engine, section }: InfoPanelContentProps) {
</div>
</div>
)}
+ {snippet.warning && (
+ <Alert
+ variant="warning"
+ description={
+ <>
+ {getSnippetWarning(t, snippet.warning.key)}{" "}
+ <LearnMoreLink href={snippet.warning.url} />
+ </>
+ }
+ />
+ )}
{snippet.learnMoreLinks && snippet.learnMoreLinks.length > 0 && (
<div className="flex flex-col gap-y-1">
{snippet.learnMoreLinks.map((link) => (
@@ -223,6 +237,15 @@ function getSnippetContentTranslation(
return exhaustive;
}
+function getSnippetWarning(t: TFunction, key: InfoSnippetWarningKey) {
+ switch (key) {
+ case "instance.sentence.create-user-example.mysql.warn":
+ return t("instance.sentence.create-user-example.mysql.warn");
+ }
+ const exhaustive: never = key;
+ return exhaustive;
+}
+
function getSnippetLinkTitle(t: TFunction, key: InfoSnippetLinkTitleKey) {
switch (key) {
case "instance.info.configure-database-user.link":
diff --git a/frontend/src/components/instance/info-content.ts b/frontend/src/components/instance/info-content.ts
index d5daa19b4f..8c34fb6ce7 100644
--- a/frontend/src/components/instance/info-content.ts
+++ b/frontend/src/components/instance/info-content.ts
@@ -31,6 +31,9 @@ export type InfoSnippetLinkTitleKey =
| "instance.info.ssh-tunnel.link"
| "instance.info.ssl-tls-connection.link";
+export type InfoSnippetWarningKey =
+ "instance.sentence.create-user-example.mysql.warn";
+
export type InfoSnippet = {
contentKey: InfoSnippetContentKey;
contentInterpolation?: Record<string, string>;
@@ -38,6 +41,10 @@ export type InfoSnippet = {
language: string;
code: string;
};
+ warning?: {
+ key: InfoSnippetWarningKey;
+ url: string;
+ };
learnMoreLinks?: {
titleKey: InfoSnippetLinkTitleKey;
url: string;
@@ -92,39 +99,40 @@ ALTER USER ${DATASOURCE_ADMIN_USER_NAME} WITH SUPERUSER;`,
},
};
-const mysqlContent: Partial<Record<InfoSection, InfoSnippet>> = {
- host: {
- contentKey: "instance.info.mysql.host.content",
- learnMoreLinks: [
- {
- titleKey: "instance.info.connect-instance.link",
- url: "https://docs.bytebase.com/get-started/instance?source=console",
- },
- ],
+const mysqlAuthentication: InfoSnippet = {
+ contentKey: "instance.info.mysql.authentication.content",
+ contentInterpolation: {
+ user: DATASOURCE_ADMIN_USER_NAME,
},
- authentication: {
- contentKey: "instance.info.mysql.authentication.content",
- contentInterpolation: {
- user: DATASOURCE_ADMIN_USER_NAME,
- },
- codeBlock: {
- language: "sql",
- code: `CREATE USER ${DATASOURCE_ADMIN_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';
+ codeBlock: {
+ language: "sql",
+ code: `CREATE USER ${DATASOURCE_ADMIN_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';
GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW,
DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES,
SELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE,
RELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE
-/*!80000 , SET_USER_ID */
ON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`,
+ },
+ learnMoreLinks: [
+ {
+ titleKey: "instance.info.configure-database-user.link",
+ url: "https://docs.bytebase.com/get-started/instance?source=console#configure-a-database-user",
},
+ ],
+};
+
+const mysqlContent: Partial<Record<InfoSection, InfoSnippet>> = {
+ host: {
+ contentKey: "instance.info.mysql.host.content",
learnMoreLinks: [
{
- titleKey: "instance.info.configure-database-user.link",
- url: "https://docs.bytebase.com/get-started/instance?source=console#configure-a-database-user",
+ titleKey: "instance.info.connect-instance.link",
+ url: "https://docs.bytebase.com/get-started/instance?source=console",
},
],
},
+ authentication: mysqlAuthentication,
ssl: {
contentKey: "instance.info.mysql.ssl.content",
learnMoreLinks: [
@@ -145,6 +153,19 @@ ON *.* to ${DATASOURCE_ADMIN_USER_NAME}@'%';`,
},
};
+// TiDB, MariaDB, and OceanBase reuse the MySQL snippets, but the definer warning names
+// MySQL versions, so only MySQL gets it.
+const mysqlOnlyContent: Partial<Record<InfoSection, InfoSnippet>> = {
+ ...mysqlContent,
+ authentication: {
+ ...mysqlAuthentication,
+ warning: {
+ key: "instance.sentence.create-user-example.mysql.warn",
+ url: "https://docs.bytebase.com/get-started/connect/mysql?source=console#create-a-user-for-bytebase",
+ },
+ },
+};
+
const mongodbContent: Partial<Record<InfoSection, InfoSnippet>> = {
host: {
contentKey: "instance.info.mongodb.host.content",
@@ -204,7 +225,7 @@ const engineContentMap: Partial<
Record<Engine, Partial<Record<InfoSection, InfoSnippet>>>
> = {
[Engine.POSTGRES]: postgresqlContent,
- [Engine.MYSQL]: mysqlContent,
+ [Engine.MYSQL]: mysqlOnlyContent,
[Engine.TIDB]: mysqlContent,
[Engine.MARIADB]: mysqlContent,
[Engine.OCEANBASE]: mysqlContent,
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 8de32eec8f..cb099ad9f8 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1307,7 +1307,11 @@
"template": "Below is an example to create user '{{user}}' with password {{password}} and grant the user with the needed privileges. First you need to enable ClickHouse SQL-driven workflow {{link}} and then run the following query to create the user."
},
"mysql": {
- "template": "Below is an example to create user {{user}}@% with password {{password}} and grant the user with the needed privileges."
+ "template": "Below is an example to create user {{user}}@% with password {{password}} and grant the user with the needed privileges.",
+ "warn": "To let Bytebase run changes that set DEFINER to another account, also grant SET_USER_ID on MySQL 8.0 or SET_ANY_DEFINER on MySQL 8.4 and later. Some cloud providers restrict these privileges."
+ },
+ "oracle": {
+ "warn": "GRANT ALL PRIVILEGES doesn't work on Amazon RDS for Oracle."
},
"postgresql": {
"template": "Below is an example to create user '{{user}}' with password {{password}} and grant the user with the needed privileges. If the connecting instance is self-hosted, then you can grant SUPERUSER.",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index ff2df59be3..3b6f91ad74 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1307,7 +1307,11 @@
"template": "A continuación se muestra un ejemplo para crear el usuario '{{user}}' con la contraseña {{password}} y otorgar al usuario los privilegios necesarios. Primero debe habilitar el flujo de trabajo impulsado por SQL de ClickHouse {{link}} y luego ejecutar la siguiente consulta para crear el usuario."
},
"mysql": {
- "template": "A continuación se muestra un ejemplo para crear el usuario {{user}}@% con la contraseña {{password}} y otorgarle al usuario los privilegios necesarios."
+ "template": "A continuación se muestra un ejemplo para crear el usuario {{user}}@% con la contraseña {{password}} y otorgarle al usuario los privilegios necesarios.",
+ "warn": "Para que Bytebase pueda ejecutar cambios que asignan DEFINER a otra cuenta, otorga también SET_USER_ID en MySQL 8.0 o SET_ANY_DEFINER en MySQL 8.4 y versiones posteriores. Algunos proveedores de nube restringen estos privilegios."
+ },
+ "oracle": {
+ "warn": "GRANT ALL PRIVILEGES no funciona en Amazon RDS for Oracle."
},
"postgresql": {
"template": "A continuación se muestra un ejemplo para crear el usuario '{{user}}' con la contraseña {{password}} y otorgar al usuario los privilegios necesarios. Si la instancia de conexión está alojada por ti mismo, puedes otorgar SUPERUSER.",
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index f63684b2fb..7bbca28161 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1307,7 +1307,11 @@
"template": "ユーザー {{user}}、パスワード {{password}} を作成し、必要な権限を付与する例は次のとおりです。次のコマンドを実行してユーザーを作成する前に、{{link}} を有効にする必要があります。"
},
"mysql": {
- "template": "ユーザー {{user}}、パスワード {{password}} を作成し、必要な権限を付与する例は次のとおりです。"
+ "template": "ユーザー {{user}}、パスワード {{password}} を作成し、必要な権限を付与する例は次のとおりです。",
+ "warn": "DEFINER を別のアカウントに設定する変更を Bytebase で実行するには、MySQL 8.0 では SET_USER_ID、MySQL 8.4 以降では SET_ANY_DEFINER も付与してください。一部のクラウドプロバイダーはこれらの権限を制限しています。"
+ },
+ "oracle": {
+ "warn": "Amazon RDS for Oracle では GRANT ALL PRIVILEGES を実行できません。"
},
"postgresql": {
"template": "ユーザー {{user}}、パスワード {{password}} を作成し、必要な権限を付与する例は次のとおりです。接続しているインスタンスが自己ホスト型の場合は、SUPERUSER を付与できます。",
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 7a84943d6e..f1253de9cc 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1307,7 +1307,11 @@
"template": "Dưới đây là ví dụ để tạo người dùng '{{user}}' với mật khẩu {{password}} và cấp cho người dùng các đặc quyền cần thiết. Đầu tiên, bạn cần bật {{link}} quy trình công việc dựa trên SQL và sau đó chạy truy vấn sau để tạo người dùng."
},
"mysql": {
- "template": "Dưới đây là ví dụ để tạo người dùng {{user}}@% với mật khẩu {{password}} và cấp cho người dùng các đặc quyền cần thiết."
+ "template": "Dưới đây là ví dụ để tạo người dùng {{user}}@% với mật khẩu {{password}} và cấp cho người dùng các đặc quyền cần thiết.",
+ "warn": "Để Bytebase chạy các thay đổi đặt DEFINER thành một tài khoản khác, hãy cấp thêm SET_USER_ID trên MySQL 8.0 hoặc SET_ANY_DEFINER trên MySQL 8.4 trở lên. Một số nhà cung cấp đám mây hạn chế các đặc quyền này."
+ },
+ "oracle": {
+ "warn": "GRANT ALL PRIVILEGES không hoạt động trên Amazon RDS for Oracle."
},
"postgresql": {
"template": "Dưới đây là ví dụ để tạo người dùng '{{user}}' với mật khẩu {{password}} và cấp cho người dùng các đặc quyền cần thiết. Nếu phiên bản kết nối được tự lưu trữ, thì bạn có thể cấp SUPERUSER.",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 09e7e0c587..9c0d06b485 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1307,7 +1307,11 @@
"template": "创建用户 {{user}},密码 {{password}},并授予必要权限的例子如下。您需要首先启用 {{link}},才能执行以下创建用户的命令。"
},
"mysql": {
- "template": "创建用户 {{user}},密码 {{password}},并授予必要权限的例子如下。"
+ "template": "创建用户 {{user}},密码 {{password}},并授予必要权限的例子如下。",
+ "warn": "如需让 Bytebase 执行将 DEFINER 设为其他账户的变更,还需授予 MySQL 8.0 的 SET_USER_ID 或 MySQL 8.4 及以上版本的 SET_ANY_DEFINER。部分云服务商会限制这些权限。"
+ },
+ "oracle": {
+ "warn": "GRANT ALL PRIVILEGES 在 Amazon RDS for Oracle 上无法执行。"
},
"postgresql": {
"template": "创建用户 {{user}},密码 {{password}},并授予必要权限的例子如下。如果您将要连接到的实例是自己托管的,那么您可以 grant SUPERUSER。",