Instructions for running the `mariadb-install-db` script on Unix-like systems to initialize the MariaDB data directory and system tables.
mariadb-install-db initializes the MariaDB data directory and creates the system tables in the mysql database, if they do not exist. MariaDB uses these tables to manage privileges, roles, and plugins. It also uses them to provide the data for the help command in the mariadb client.
mariadb-install-db works by starting MariaDB Server's mysqld process in --bootstrap mode and sending commands to create the system tables and their content.
There is a version specifically for Windows, mysql_install_db.exe.
To invoke mariadb-install-db, use the following syntax:
For the options supported by mariadb-install-db, see mariadb-install-db: Options.
For the option groups read by , see .
See for information on the installation process.
See for information on how to troubleshoot the installation process.
The Windows version of mariadb-install-db:
This page is licensed: CC BY-SA / Gnu FDL
mariadb-install-db --user=mysqlExplains the necessity of initializing system tables (using mariadb-install-db) after installation and troubleshooting startup issues related to missing tables.
Details the use of `mariadb-install-db.exe` on Windows to create new database instances, set the root password, and register Windows services.
The mariadb-install-db.exe utility is the Windows equivalent of mariadb-install-db.
The functionality of mariadb-install-db.exe is comparable with the shell script mariadb-install-db used on Unix, however it has been extended with both Windows specific functionality (creating a Windows service) and to generally useful functionality. For example, it can set the 'root' user password during database creation. It also creates the my.ini configuration file in the data directory and adds most important parameters to it (e.g port).
mariadb-install-db.exe is used by the MariaDB installer for Windows if the "Database instance" feature is selected. It obsoletes similar utilities and scripts that were used in the past such as mysqld.exe --install,mysql_install_db.pl, and mysql_secure_installation.pl.
will create the database in the directory C:\db, register the auto-start
Windows service "MyDB", and set the root password to 'secret'.
To start the service from the command line, execute
If you run your database instance as service, to remove it completely from the command line, use
This page is licensed: CC BY-SA / Gnu FDL
-D, --default-user
Create default user
-R, --allow-remote-root-access
Allow remote access from network for user root
-N, --skip-networking
Do not use TCP connections, use pipe instead
-i, --innodb-page-size
Innodb page size, since MariaDB 10.2.5
-s, --silent
Print less information
-o, --verbose-bootstrap
Include mysqld bootstrap output
-l, --large-pages
Use large pages, since MariaDB 10.6.1
-c, --config
my.ini config template file, since MariaDB 10.6.1
-?, --help
Display help message and exit
-d, --datadir=name
Data directory of the new database
-S, --service=name
Name of the Windows service
-p, --password=name
Password of the root user
-P, --port=#
mysqld port
-W, --socket=name
named pipe name
mariadb-install-db.exe --datadir=C:\db --service=MyDB --password=secretsc start MyDBsc stop <servicename>
sc delete <servicename>
rmdir /s /q <path-to-datadir>