Skip to content

Commit 8141b52

Browse files
mariadb-stefan-hinzgitbook-bot
authored andcommitted
GITBOOK-1710: Page descriptions. Various page fixes while at it
1 parent 15b9732 commit 8141b52

15 files changed

+187
-130
lines changed

server/SUMMARY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,15 @@
545545
* [Automated Deployment & Administration](server-management/automated-mariadb-deployment-and-administration/README.md)
546546
* [Starting & Stopping](server-management/starting-and-stopping-mariadb/README.md)
547547
* [Starting and Stopping Overview](server-management/starting-and-stopping-mariadb/starting-and-stopping-mariadb-automatically.md)
548-
* [launchd](server-management/starting-and-stopping-mariadb/launchd.md)
549-
* [systemd](server-management/starting-and-stopping-mariadb/systemd.md)
548+
* [launchd (macOS)](server-management/starting-and-stopping-mariadb/launchd.md)
549+
* [systemd (Linux)](server-management/starting-and-stopping-mariadb/systemd.md)
550550
* [sysVinit](server-management/starting-and-stopping-mariadb/sysvinit.md)
551551
* [mariadbd-safe](server-management/starting-and-stopping-mariadb/mariadbd-safe.md)
552552
* [mariadbd-multi](server-management/starting-and-stopping-mariadb/mariadbd-multi.md)
553553
* [mariadbd Options](server-management/starting-and-stopping-mariadb/mariadbd-options.md)
554554
* [mariadbd](server-management/starting-and-stopping-mariadb/mariadbd.md)
555555
* [mysql.server](server-management/starting-and-stopping-mariadb/mysql-server.md)
556-
* [Running MariaDB from the Build Directory](server-management/starting-and-stopping-mariadb/running-mariadb-from-the-build-directory.md)
556+
* [Running MariaDB From the Build Directory](server-management/starting-and-stopping-mariadb/running-mariadb-from-the-build-directory.md)
557557
* [Running Multiple MariaDB Server Processes](server-management/starting-and-stopping-mariadb/running-multiple-mariadb-server-processes.md)
558558
* [Specifying Permissions for Schema (Data) Directories and Tables](server-management/starting-and-stopping-mariadb/specifying-permissions-for-schema-data-directories-and-tables.md)
559559
* [Switching Between Different Installed MariaDB Versions](server-management/starting-and-stopping-mariadb/switching-between-different-installed-mariadb-versions.md)

server/server-management/starting-and-stopping-mariadb/launchd.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
---
2+
description: >-
3+
Instructions for configuring MariaDB to start automatically on macOS using a
4+
launchd plist file in /Library/LaunchDaemons.
5+
---
16

2-
# launchd
7+
# launchd (macOS)
38

4-
In MacOS, create a file called /Library/LaunchDaemons/com.mariadb.server.plist with the following contents (edit to suit):
9+
If you install MariaDB on macOS using Homebrew – which is the only option – starting and stopping `mariadbd` (MariaDB server) is done as [described on this page](../install-and-upgrade-mariadb/installing-mariadb/binary-packages/installing-mariadb-on-macos-using-homebrew.md). The below instructions don't need to be performed.
510

11+
***
12+
13+
On macOS, create a file called `/Library/LaunchDaemons/com.mariadb.server.plist` with the following contents (edit to suit):
614

715
```
816
<?xml version="1.0" encoding="UTF-8"?>
@@ -33,15 +41,11 @@ In MacOS, create a file called /Library/LaunchDaemons/com.mariadb.server.plist w
3341

3442
Then from a shell, run `launchctl load /Library/LaunchDaemons/com.mariadb.server.plist` and MariaDB will run immediately, and also upon reboot.
3543

36-
3744
## See Also
3845

39-
4046
* [Creating Launch Daemons and Agents](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html)
4147
* [A launchd Tutorial](https://www.launchd.info/)
4248

43-
4449
<sub>_This page is licensed: CC BY-SA / Gnu FDL_</sub>
4550

46-
4751
{% @marketo/form formId="4316" %}

server/server-management/starting-and-stopping-mariadb/mariadbd-multi.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
---
2+
description: >-
3+
Explains how to use `mariadbd-multi` to manage multiple MariaDB server
4+
processes on a single host using GNR groups in the configuration file.
5+
---
6+
17
# mariadbd-multi
28

39
Before using mariadbd-multi be sure that you understand the meanings of the options that are passed to the mariadbd servers and why you would want to have separate mariadbd processes. Beware of the dangers of using multiple mariadbd servers with the same data directory. Use separate data directories, unless you know what you are doing. Starting multiple servers with the same data directory does not give you extra performance in a threaded system.
410

511
The `mariadbd-multi` startup script is in MariaDB distributions on Linux and Unix. It is a wrapper that is designed to manage several `mariadbd` processes running on the same host.
612

7-
Prior to [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105), the client was called `mysqld_multi`. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
13+
{% hint style="info" %}
14+
Previously, the client was called `mysqld_multi`. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
15+
{% endhint %}
816

917
In order for multiple `mariadbd` processes to work on the same host, these processes must:
1018

@@ -19,7 +27,7 @@ In order for multiple `mariadbd` processes to work on the same host, these proce
1927

2028
The command to use `mariadbd-multi` and the general syntax is:
2129

22-
```
30+
```bash
2331
mariadbd-multi [options] {start|stop|report} [GNR[,GNR] ...]
2432
```
2533

server/server-management/starting-and-stopping-mariadb/mariadbd-options.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
description: >-
3+
A reference list of command-line options available for the `mariadbd` server
4+
binary, covering configuration, replication, and service installation.
5+
---
6+
17
# mariadbd Options
28

39
This page lists all of the options for `mariadbd` (called mysqld before [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105)), ordered by topic. For a full alphabetical list of all mariadbd options, as well as server and status variables, see [Full list of MariaDB options, system and status variables](../../reference/full-list-of-mariadb-options-system-and-status-variables.md).
@@ -8,7 +14,9 @@ By convention, [server variables](../../ha-and-performance/optimization-and-tuni
814

915
See [Configuring MariaDB with Option Files](../install-and-upgrade-mariadb/configuring-mariadb/configuring-mariadb-with-option-files.md) for which files and groups mariadbd reads for it's default options.
1016

11-
Prior to [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105), the client used to be called `mysqld`, and can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
17+
{% hint style="info" %}
18+
Previously, the client used to be called `mysqld`, and can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
19+
{% endhint %}
1220

1321
## Option Prefixes
1422

server/server-management/starting-and-stopping-mariadb/mariadbd-safe.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
---
2+
description: >-
3+
Details the `mariadbd-safe` wrapper script, which adds safety features like
4+
auto-restart upon crash and error logging to syslog.
5+
---
6+
17
# mariadbd-safe
28

3-
The `mariadbd-safe` startup script is in MariaDB distributions on Linux and Unix. It is a wrapper that starts `mariadbd` with some extra safety features. For example, if `mariadbd-safe` notices that `mariadbd` has crashed, then `mariadbd-safe` will automatically restart `mariadbd`.
9+
The `mariadbd-safe` startup script is in MariaDB distributions on Linux and Unix. It is a wrapper that starts `mariadbd` with some extra safety features. For example, if `mariadbd-safe` notices that `mariadbd` has crashed, then `mariadbd-safe` automatically restarts `mariadbd`.
410

511
`mariadbd-safe` is the recommended way to start `mariadbd` on Linux and Unix distributions that do not support [systemd](systemd.md). Additionally, the [mysql.server](mysql-server.md) init script used by [sysVinit](sysvinit.md) starts `mariadbd` with `mariadbd-safe` by default.
612

7-
Prior to [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105), the client used to be called `mysqld_safe`, and can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
13+
{% hint style="info" %}
14+
Previously, the client used to be called `mysqld_safe`, and can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
15+
{% endhint %}
816

917
## Using mariadbd-safe
1018

1119
The command to use `mariadbd-safe` and the general syntax is:
1220

21+
{% code overflow="wrap" %}
1322
```
1423
mariadbd-safe [ --no-defaults | --defaults-file | --defaults-extra-file | --defaults-group-suffix | --print-defaults ] <options> <mariadbd_options>
1524
```
25+
{% endcode %}
1626

1727
### Options
1828

@@ -95,18 +105,18 @@ The `[safe_mariadbd]` option group is primarily supported for backward compatibi
95105

96106
For example, if you specify the [log\_error](../../ha-and-performance/optimization-and-tuning/system-variables/server-system-variables.md#log_error) option in a server option group in an option file, like this:
97107

98-
```toml
108+
```ini
99109
[mariadb]
100110
log_error=error.log
101111
```
102112

103-
Then `mariadbd-safe` will also use this value for its own `--log-error` option:
113+
Then `mariadbd-safe` also uses this value for its own `--log-error` option:
104114

105115
### Configuring the Open Files Limit
106116

107117
When using `mariadbd-safe`, the system's open files limit can be changed by providing the `--open-files-limit` option either on the command-line or in an option file. For example:
108118

109-
```
119+
```ini
110120
[mariadbd-safe]
111121
open_files_limit=4294967295
112122
```
@@ -119,7 +129,7 @@ When `mariadbd-safe` starts `mariadbd`, it also uses this option to set the valu
119129

120130
When using `mariadbd-safe`, if you would like to [enable core dumps](https://app.gitbook.com/s/WCInJQ9cmGjq1lsTG91E/development-articles/debugging-mariadb/enabling-core-dumps), the system's core file size limit can be changed by providing the `--core-file-size` option either on the command-line or in an option file. For example:
121131

122-
```
132+
```ini
123133
[mariadbd-safe]
124134
core_file_size=unlimited
125135
```

server/server-management/starting-and-stopping-mariadb/mariadbd.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
---
2+
description: >-
3+
Describes the `mariadbd` binary (formerly `mysqld`), which is the core
4+
database server executable.
5+
---
6+
17
# mariadbd
28

3-
Prior to [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105), the client was called `mysqld`. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
9+
{% hint style="info" %}
10+
Previously, the client was called `mysqld`. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
11+
{% endhint %}
412

513
See [mariadbd-options](mariadbd-options.md) for details.
614

server/server-management/starting-and-stopping-mariadb/mysql-server.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
---
2+
description: >-
3+
Documentation for the `mysql.server` script, a SysVinit-style wrapper used to
4+
start and stop `mariadbd-safe`.
5+
---
6+
17
# mysql.server
28

39
The [mysql.server](mysql-server.md) startup script is in MariaDB distributions on Linux and Unix. It is a wrapper that works as a standard [sysVinit](sysvinit.md) script. However, it can be used independently of [sysVinit](sysvinit.md) as a regular `sh` script. The script starts the [mariadbd](mariadbd-options.md) server process by first changing its current working directory to the MariaDB install directory and then starting [mariadbd-safe](mariadbd-safe.md). The script requires the standard [sysVinit](sysvinit.md) arguments, such as `start`, `stop`, `restart`, and `status`. For example:
410

5-
```
11+
```bash
612
mysql.server start
713
mysql.server restart
814
mysql.server stop
@@ -17,13 +23,15 @@ The `mysql.server` script starts [mariadbd](mariadbd-options.md) by first changi
1723

1824
The command to use `mysql.server` and the general syntax is:
1925

20-
```
26+
{% code overflow="wrap" %}
27+
```bash
2128
mysql.server [ start | stop | restart | status ] <options> <mariadbd_options>
2229
```
30+
{% endcode %}
2331

2432
### Options
2533

26-
If an unknown option is provided to `mariadbd-safe` on the command-line, then it is passed to `mariadbd-safe`.
34+
If an unknown option is provided to `mariadbd-safe` on the command-line, it is passed to `mariadbd-safe`.
2735

2836
`mysql.server` supports the following options:
2937

@@ -76,9 +84,9 @@ If you have installed MariaDB to a non-standard location, then you may need to e
7684

7785
If you do not want to edit the `mysql.server` script itself, then `mysql.server` also sources a few other `sh` scripts. These files can be used to set any variables that might be needed to make the script work in your specific environment. The files are:
7886

79-
* /etc/default/mysql
80-
* /etc/sysconfig/mysql
81-
* /etc/conf.d/mysql
87+
* `/etc/default/mysql`
88+
* `/etc/sysconfig/mysql`
89+
* `/etc/conf.d/mysql`
8290

8391
## Installed Locations
8492

@@ -88,18 +96,17 @@ If you do not want to edit the `mysql.server` script itself, then `mysql.server`
8896

8997
On systems that use [sysVinit](sysvinit.md), `mysql.server` may also be installed in other locations and with other names.
9098

91-
If you installed MariaDB on Linux using [RPMs](../install-and-upgrade-mariadb/installing-mariadb/binary-packages/rpm/), then the `mysql.server` script will be installed into the `/etc/init.d` directory with the name `mysql`. You need not install it manually.
99+
If you installed MariaDB on Linux using [RPMs](../install-and-upgrade-mariadb/installing-mariadb/binary-packages/rpm/), the `mysql.server` script is installed in the `/etc/init.d` directory with the name `mysql`. You need not install it manually.
92100

93101
#### Manually Installing with SysVinit
94102

95-
If you install MariaDB from [source](../install-and-upgrade-mariadb/installing-mariadb/compiling-mariadb-from-source/) or from a [binary tarball](../install-and-upgrade-mariadb/installing-mariadb/binary-packages/installing-mariadb-binary-tarballs.md) that does not install [mysql.server](mysql-server.md)\
96-
automatically, and if you are on a system that uses [sysVinit](sysvinit.md), then you can manually install `mysql.server` with [sysVinit](sysvinit.md). This is usually done by copying it to `/etc/init.d/` and then creating specially named symlinks in the appropriate `/etc/rcX.d/` directories (where 'X' is a number between 0 and 6).
103+
If you install MariaDB from [source](../install-and-upgrade-mariadb/installing-mariadb/compiling-mariadb-from-source/) or from a [binary tarball](../install-and-upgrade-mariadb/installing-mariadb/binary-packages/installing-mariadb-binary-tarballs.md) that does not install [mysql.server](mysql-server.md) automatically, and if you are on a system that uses [sysVinit](sysvinit.md), then you can manually install `mysql.server` with [sysVinit](sysvinit.md). This is usually done by copying it to `/etc/init.d/` and then creating specially named symlinks in the appropriate `/etc/rcX.d/` directories (where 'X' is a number between 0 and 6).
97104

98-
In the examples below we will follow the historical convention of renaming the`mysql.server` script to '`mysql`' when we copy it to `/etc/init.d/`.
105+
In the examples below we will follow the historical convention of renaming the `mysql.server` script to '`mysql`' when we copy it to `/etc/init.d/`.
99106

100107
The first step for most Linux distributions is to copy the `mysql.server` script to `/etc/init.d/` and make it executable:
101108

102-
```
109+
```bash
103110
cd /path/to/your/mariadb-version/support-files/
104111
cp mysql.server /etc/init.d/mysql
105112
chmod +x /etc/init.d/mysql
@@ -109,20 +116,20 @@ Now all that is needed is to create the specially-named symlinks. On both RPM an
109116

110117
On RPM-based distributions (like Fedora and CentOS), you use `chkconfig`:
111118

112-
```
119+
```bash
113120
chkconfig --add mysql
114121
chkconfig --level 345 mysql on
115122
```
116123

117124
On Debian-based distributions you use `update-rc.d`:
118125

119-
```
126+
```bash
120127
update-rc.d mysql defaults
121128
```
122129

123130
On FreeBSD, the location for startup scripts is`/usr/local/etc/rc.d/` and when you copy the`mysql.server` script there you should rename it so that it matches the `*.sh` pattern, like so:
124131

125-
```
132+
```bash
126133
cd /path/to/your/mariadb/support-files/
127134
cp mysql.server /usr/local/etc/rc.d/mysql.server.sh
128135
```

server/server-management/starting-and-stopping-mariadb/running-mariadb-from-the-build-directory.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# Running MariaDB from the Build Directory
1+
---
2+
description: >-
3+
Instructions for developers on how to run MariaDB directly from the source
4+
build directory without installing it to system paths.
5+
---
26

3-
You can run mariadbd directly from the build directory (without doing`make install`).
7+
# Running MariaDB From the Build Directory
8+
9+
You can run mariadbd directly from the build directory (without doing `make install`).
410

511
## Starting mariadbd After Build on Windows
612

713
On Windows, the data directory is produced during the build.
814

915
The simplest way to start database from the command line is:
1016

11-
1. Go to the directory where mariadbd.exe is located (subdirectory sql\Debug or sql\Relwithdebinfo of the build directory)
12-
2. From here, execute, if you are using [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105) or newer,
13-
14-
```
15-
mariadbd.exe --console
16-
```
17-
18-
else
17+
1. Go to the directory where mariadbd.exe is located (subdirectory `sql\Debug` or `sql\Relwithdebinfo` of the build directory)
18+
2. From here, execute:
1919

2020
```
2121
mariadbd.exe --console
2222
```
2323

24-
As usual, you can pass other server parameters on the command line, or store them in a my.ini configuraton file and pass `--defaults-file=path\to\my.ini`
24+
Pass other server parameters on the command line, or store them in a `my.ini` configuraton file and pass `--defaults-file=path\to\my.ini` .
2525

26-
The default search path on Windows for the my.ini file is:
26+
The default search path on Windows for the `my.ini` file is:
2727

28-
* GetSystemWindowsDirectory()
29-
* GetWindowsDirectory()
30-
* C:\\
28+
* `GetSystemWindowsDirectory()`
29+
* `GetWindowsDirectory()`
30+
* `C:\`
3131
* Directory where the executable is located
3232

3333
## Starting mariadbd After Build on Unix
@@ -36,7 +36,7 @@ Copy the following to your '`~/.my.cnf`' file.
3636

3737
There are two lines you have to edit: '`datadir=`' and '`language=`'. Be sure to change them to match your environment.
3838

39-
```
39+
```ini
4040
# Example MariadB config file.
4141
# You can copy this to one of:
4242
# /etc/my.cnf to set global options,
@@ -97,31 +97,31 @@ set-variable= key_buffer=128M
9797

9898
With the above file in place, go to your MariaDB source directory and execute:
9999

100+
{% code overflow="wrap" %}
101+
```bash
102+
./scripts/mariadb-install-db --srcdir=$PWD --datadir=/path/to/data/dir
100103
```
101-
./scripts/mariadb-install-db --srcdir=$PWD --datadir=/path/to/data/dir --user=$LOGNAME
102-
```
104+
{% endcode %}
103105

104-
Above '$PWD' is the environment variable that points to your current directory.\
105-
If you added `datadir` to your `my.cnf`, you don't have to give this option above.\
106-
Also above, --user=$LOGNAME is necessary when using msqyld 10.0.1-MariaDB (and possibly other versions)
106+
* `$PWD` is the environment variable that points to your current directory. If you added `datadir` to your `my.cnf`, you don't have to specify this option.
107107

108-
Now you can start `mariadbd` (or `mysqld` if you are using a version older than [MariaDB 10.5](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/mariadb-10-5-series/what-is-mariadb-105)) in the debugger:
108+
Now you can start `mariadbd` in the debugger:
109109

110-
```
110+
```bash
111111
cd sql
112112
ddd ./mariadbd &
113113
```
114114

115-
Or start mariadbd on its own:
115+
Or start `mariadbd` on its own:
116116

117-
```
117+
```bash
118118
cd sql
119119
./mariadbd &
120120
```
121121

122122
After starting up `mariadbd` using one of the above methods (with the debugger or without), launch the client (as root if you don't have any users setup yet).
123123

124-
```
124+
```bash
125125
../client/mariadb
126126
```
127127

0 commit comments

Comments
 (0)