gpt4 book ai didi

mysql - 如何在 Windows 上引导 MySQL?

转载 作者:可可西里 更新时间:2023-11-01 11:53:12 27 4
gpt4 key购买 nike

我正在尝试在 Windows 7 x64 上引导 mysqld。我应该怎么做?

(“ Bootstrap ”是指创建初始数据目录和系统表。我想我会在 Unix 上使用 mysql_install_db,但文档说这不适用于 Windows?)

到目前为止我做了什么:

  • 我安装了 MySQL。
  • 我正在尝试使用不同的 .ini 文件创建一个新的 mysqld 实例。
  • 我想“从头开始”创建 mysqld 的新实例及其相关文件(即我不想从现有安装中复制任何文件。

我正在运行的确切命令是:

D:\MySQL5.6\MySQL Server 5.6\bin\mysqld.exe --defaults-file=my-test-server-C.ini --bootstrap --lc-messages-dir=D:\MySQL5.6\MySQL Server 5.6\share\ --character-sets-dir=D:\MySQL5.6\MySQL Server 5.6\share\charsets\

文件“my-test-server-C.ini”确实存在并且似乎是有效的。如果有帮助,我可以提供任何详细信息。

执行命令后,stderr上没有任何输出。

我确实在“test-server-C.err”中看到有关“引导文件错误”的错误。我的理解是 --bootstrap 选项应该创建所有必要的表?我认为这不是权限问题。

“test-server-C.err”文件包含以下内容:

2014-06-25 10:52:19 9540 [Note] Plugin 'FEDERATED' is disabled.
2014-06-25 10:52:19 9540 [Warning] option 'innodb-autoextend-increment': unsigned value 67108864 adjusted to 1000
2014-06-25 10:52:19 45c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-06-25 10:52:19 9540 [Note] InnoDB: The InnoDB memory heap is disabled
2014-06-25 10:52:19 9540 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-06-25 10:52:19 9540 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-06-25 10:52:19 9540 [Note] InnoDB: Not using CPU crc32 instructions
2014-06-25 10:52:19 9540 [Note] InnoDB: Initializing buffer pool, size = 703.0M
2014-06-25 10:52:19 9540 [Note] InnoDB: Completed initialization of buffer pool
2014-06-25 10:52:19 9540 [Note] InnoDB: The first specified data file .\ibdata1 did not exist: a new database to be created!
2014-06-25 10:52:19 9540 [Note] InnoDB: Setting file .\ibdata1 size to 12 MB
2014-06-25 10:52:19 9540 [Note] InnoDB: Database physically writes the file full: wait...
2014-06-25 10:52:19 9540 [Note] InnoDB: Setting log file .\ib_logfile101 size to 48 MB
2014-06-25 10:52:19 9540 [Note] InnoDB: Setting log file .\ib_logfile1 size to 48 MB
2014-06-25 10:52:20 9540 [Note] InnoDB: Renaming log file .\ib_logfile101 to .\ib_logfile0
2014-06-25 10:52:20 9540 [Warning] InnoDB: New log files created, LSN=45781
2014-06-25 10:52:20 9540 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-06-25 10:52:20 9540 [Note] InnoDB: Doublewrite buffer created
2014-06-25 10:52:20 9540 [Note] InnoDB: 128 rollback segment(s) are active.
2014-06-25 10:52:20 9540 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-06-25 10:52:20 9540 [Note] InnoDB: Foreign key constraint system tables created
2014-06-25 10:52:20 9540 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-06-25 10:52:20 9540 [Note] InnoDB: Tablespace and datafile system tables created.
2014-06-25 10:52:20 9540 [Note] InnoDB: Waiting for purge to start
2014-06-25 10:52:20 9540 [Note] InnoDB: 5.6.12 started; log sequence number 0
2014-06-25 10:52:20 9540 [Note] RSA private key file not found: D:\Projects\mysqlab\data-test-server-C\\private_key.pem. Some authentication plugins will not work.
2014-06-25 10:52:20 9540 [Note] RSA public key file not found: D:\Projects\mysqlab\data-test-server-C\\public_key.pem. Some authentication plugins will not work.
ERROR: 1105 Bootstrap file error, return code (32). Nearest query: ''
2014-06-25 10:52:20 9540 [ERROR] Aborting

2014-06-25 10:52:20 9540 [Note] Binlog end
2014-06-25 10:52:20 9540 [Note] InnoDB: FTS optimize thread exiting.
2014-06-25 10:52:20 9540 [Note] InnoDB: Starting shutdown...
2014-06-25 10:52:21 9540 [Note] InnoDB: Shutdown completed; log sequence number 1600607
2014-06-25 10:52:21 9540 [Note] D:\MySQL5.6\MySQL Server 5.6\bin\mysqld.exe: Shutdown complete

更新 1

我也尝试过不使用以下命令的默认文件:

"D:\MySQL5.6\MySQL Server 5.6\bin\mysqld.exe" --no-defaults --bootstrap --basedir=D:\Projects\mysqlab --datadir=D:\Projects\mysqlab\data-test-server-C --lc-messages-dir="D:\MySQL5.6\MySQL Server 5.6\share" --character-sets-dir="D:\MySQL5.6\MySQL Server 5.6\share\charsets"

这也会导致 ERROR: 1105 Bootstrap file error, return code (32)。最近的查询:''

更新 2

我已将 private_key.pem 和 public_key.pem 从 MySQL 源 msyql-server-5.6.17\mysql-test 复制到我的数据目录。这消除了有关丢失 RSA key 的警告。但是,同样的ERROR 115仍然存在。

最佳答案

似乎对于 Windows,推荐的方法是简单地从 .zip 存档中复制现有数据目录

http://dev.mysql.com/doc/refman/5.7/en/multiple-data-directories.html

http://dev.mysql.com/downloads/mysql/

关于mysql - 如何在 Windows 上引导 MySQL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24413426/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com