我正在寻找 MariaDB 或 MySQL 运行所需的最少文件,而无需像便携式服务器一样安装它。我更喜欢 MariaDB 而不是 MySQL。我想将它嵌入到用 Delphi 编写的软件中。我的软件将能够根据需要启动和停止服务器。我用谷歌搜索过但没有成功。
我读过一篇文章https://rawgit.com/pts/portable-mariadb/master/portable_mariadb.html https://rawgit.com/pts/portable-mariadb/master/portable_mariadb.html and http://www.bluecrownsoftware.com/article/271/Installing-MySQL-without-Root-Access-on-Linux http://www.bluecrownsoftware.com/article/271/Installing-MySQL-without-Root-Access-on-Linux但它是针对 Linux 的,我没有这方面的经验。
我也读过这篇文章MySql 便携版 https://stackoverflow.com/questions/1851174/mysql-portable-version但这篇文章提到了 MySQL Essential 版本,但我找不到它。
如果我有一些成功运行服务器的配置文件提示,这将是一个额外的价值。
提前致谢。
说到 MariaDB,它是 2 个文件和 3 个目录。
布局是这样的:
- bin\mysqld.exe
- 共享\errmsg.sys
# you can take it from share\english in normal installation or ZIP
- data
# an empty directory
你可以从
bin\mysqld.exe --console --skip-grant-tables
(最后一个参数是必需的,因为您没有系统表)。
它缺少系统表,如果您需要创建它们,这将是几个文件。
这个工具有帮助https://mariadb.com/kb/en/mariadb/mysql_install_dbexe/ https://mariadb.com/kb/en/mariadb/mysql_install_dbexe/ . mysqld_install_db.exe
需要放置在旁边mysqld.exe
然后您可以使用以下命令创建系统表
mysqld_install_db.exe --datadir=path-to-datadir
更新 MariaDB 10.5.3 及更高版本
- bin\mysqld.exe
- bin\server.dll
- bin\mysql_install_db.exe(可选,运行一次创建数据目录,之后可以删除)
- data
与之前版本相比的变化:server.dll 是新的(mysqld.exe 需要它),不再需要 errmsg.sys
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)