Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimum files to run MySQL or MariaDB server on Windows - (Portable MySQL/MariaDB)

I am looking for minimum files required by MariaDB or MySQL to run without installing it like a portable server. I prefer MariaDB instead of MySQL. I want to embed it in my software written in Delphi. My software will able to start and stop the server as required. I have googled around but no success.

I have read an article https://rawgit.com/pts/portable-mariadb/master/portable_mariadb.html and http://www.bluecrownsoftware.com/article/271/Installing-MySQL-without-Root-Access-on-Linux but it is for Linux and I have no experience with it.

I have also read the article MySql portable version but this article mentioned MySQL Essential version and I am unable to find it. It will be an extra value if I have some configuration file hints for successful running the server.

Thanks in advance.

like image 929
STech Avatar asked Mar 09 '17 11:03

STech


1 Answers

Speaking of MariaDB, it is 2 files and 3 directories.

Layout is like this:

  • bin\mysqld.exe
  • share\errmsg.sys # you can take it from share\english in normal installation or ZIP
  • data # an empty directory

you can start with

bin\mysqld.exe --console --skip-grant-tables  

(last parameter is essential, as you do not have system tables).

It is missing system tables, if you need to create them, this will be a couple of more files.

this tool helps https://mariadb.com/kb/en/mariadb/mysql_install_dbexe/ . mysqld_install_db.exe needs to be placed next to mysqld.exe and then you can create system tables with

mysqld_install_db.exe --datadir=path-to-datadir

UPDATE MariaDB 10.5.3 and later

  • bin\mysqld.exe
  • bin\server.dll
  • bin\mysql_install_db.exe (optional, run once to create data directory, can be removed afterwards)
  • data

Changes compared to the previous versions : server.dll is new (mysqld.exe needs it), errmsg.sys is no more needed

like image 50
Vladislav Vaintroub Avatar answered Oct 17 '22 13:10

Vladislav Vaintroub