mysql 创建表数据目录

发布于 2024-12-26 20:47:56 字数 299 浏览 1 评论 0原文

我正在尝试使用以下命令更改 MySQL 表的数据目录。我正在窗户中尝试。但它不起作用。有人能告诉我原因吗?

CREATE TABLE clients
(
  client_id INT AUTO_INCREMENT KEY, 
  client_name VARCHAR(75), 
  telephone CHAR(15)
)
DATA DIRECTORY = 'e:\data\mysql';

该表已创建。但它是在默认数据目录中创建的。

I am trying to change the data directory of a MySQL table using the following command. I am trying in windows. But it is not working. Can somebody tell me the reason?

CREATE TABLE clients
(
  client_id INT AUTO_INCREMENT KEY, 
  client_name VARCHAR(75), 
  telephone CHAR(15)
)
DATA DIRECTORY = 'e:\data\mysql';

The table is created. But it is created in the default data directory.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余生共白头 2025-01-02 20:47:56

根据文档

这些选项仅在您不使用 --skip-symbolic-links 选项时才起作用。您的操作系统还必须有一个有效的、线程安全的 realpath() 调用。 参见第 7.9.6.2 节“使用符号链接Unix 上的表”,了解更完整的信息。

Windows 没有有效的线程安全 realpath() 调用,因此您无法执行此操作。

Per the documentation:

These options work only when you are not using the --skip-symbolic-links option. Your operating system must also have a working, thread-safe realpath() call. See Section 7.9.6.2, “Using Symbolic Links for Tables on Unix”, for more complete information.

Windows does not have a working, thread-safe realpath() call, so you can't do this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文