Skip to content

Commit d09ff82

Browse files
authored
#1867 fix markdown violation linting in database_mariadb-server.md (#1981)
1 parent 347e3fb commit d09ff82

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

docs/guides/database/database_mariadb-server.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ tags:
1212

1313
## Prerequisites
1414

15-
* A Rocky Linux server
16-
* Proficiency with a command-line editor (using _vi_ in this example)
17-
* A heavy comfort level with issuing commands from the command-line, viewing logs, and other general systems administrator duties
18-
* An understanding of _mariadb-server_ databases is helpful
19-
* Run all commands as root or with _sudo_
15+
- A Rocky Linux server
16+
- Proficiency with a command-line editor (using *vi* in this example)
17+
- A heavy comfort level with issuing commands from the command-line, viewing logs, and other general systems administrator duties
18+
- An understanding of *mariadb-server* databases is helpful
19+
- Run all commands as root or with *sudo*
2020

2121
## Introduction
2222

23-
The _mariadb-server_ and it is client _mariadb_ are the open source alternatives to _mysql-server_ and _mysql_, and they share command structure. _mariadb-server_ is running on many web servers, due to the popular [Wordpress CMS](https://wordpress.org/) which requires it. This database, though, has many other uses.
23+
The *mariadb-server* and it is client *mariadb* are the open source alternatives to *mysql-server* and *mysql*, and they share command structure. *mariadb-server* is running on many web servers, due to the popular [Wordpress CMS](https://wordpress.org/) which requires it. This database, though, has many other uses.
2424

2525
If you want to use this along with other tools for hardening a web server, refer back to the [Apache Hardened Web Server guide](../web/apache_hardened_webserver/index.md).
2626

2727
## Installing `mariadb-server`
2828

29-
You need to install _mariadb-server_:
29+
You need to install *mariadb-server*:
3030

3131
`dnf install mariadb-server`
3232

3333
## Securing `mariadb-server`
3434

35-
To strengthen the security of _mariadb-server_ you need to run a script, but before you do, you need to enable and start mariadb:
35+
To strengthen the security of *mariadb-server* you need to run a script, but before you do, you need to enable and start mariadb:
3636

3737
`systemctl enable mariadb`
3838

@@ -56,7 +56,7 @@ Next, run this command:
5656

5757
This brings up a dialog:
5858

59-
```
59+
```text
6060
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
6161
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
6262
@@ -68,11 +68,11 @@ so you should just press enter here.
6868
Enter current password for root (enter for none):
6969
```
7070

71-
Since this is a brand-new installation, no root password set. Just hit enter here.
71+
Since this is a brand-new installation, no root password set. Just hit ++enter++ here.
7272

7373
The next part of the dialog continues:
7474

75-
```
75+
```text
7676
OK, successfully used password, moving on...
7777
7878
Setting the root password ensures that nobody can log into the MariaDB
@@ -81,24 +81,24 @@ root user without the proper authorisation.
8181
Set root password? [Y/n]
8282
```
8383

84-
You absolutely _do_ want to have a root password set. You'll want to figure out what this should be and document it in a password manager somewhere so that you can pull it up if necessary. Start by hitting 'Enter' to accept the default "Y". This will bring up the password dialog:
84+
You absolutely *do* want to have a root password set. You'll want to figure out what this should be and document it in a password manager somewhere so that you can pull it up if necessary. Start by hitting ++enter++ to accept the default "Y". This will bring up the password dialog:
8585

86-
```
86+
```text
8787
New password:
8888
Re-enter new password:
8989
```
9090

9191
Enter your chosen password and then confirm it by entering it again. If this is successful, you will get the following dialog:
9292

93-
```
93+
```text
9494
Password updated successfully!
9595
Reloading privilege tables..
9696
... Success!
9797
```
9898

9999
Next the dialog deals with the anonymous user:
100100

101-
```
101+
```text
102102
By default, a MariaDB installation has an anonymous user, allowing anyone
103103
to log into MariaDB without having to have a user account created for
104104
them. This is intended only for testing, and to make the installation
@@ -108,11 +108,11 @@ production environment.
108108
Remove anonymous users? [Y/n]
109109
```
110110

111-
The answer here is "Y" so just hit 'Enter' to accept the default.
111+
The answer here is "Y" so just hit ++enter++ to accept the default.
112112

113113
The dialog proceeds to the section dealing with allowing the root user to login remotely:
114114

115-
```
115+
```text
116116
... Success!
117117
118118
Normally, root should only be allowed to connect from 'localhost'. This
@@ -121,11 +121,11 @@ ensures that someone cannot guess at the root password from the network.
121121
Disallow root login remotely? [Y/n]
122122
```
123123

124-
root should only be needed locally on the machine. So accept this default as well by hitting 'Enter'.
124+
root should only be needed locally on the machine. So accept this default as well by hitting ++enter++.
125125

126-
The dialog then moves on to the 'test' database that is automatically installed with _mariadb-server_:
126+
The dialog then moves on to the 'test' database that is automatically installed with *mariadb-server*:
127127

128-
```
128+
```text
129129
... Success!
130130
131131
@@ -136,11 +136,11 @@ before moving into a production environment.
136136
Remove test database and access to it? [Y/n]
137137
```
138138

139-
Again, the answer here is the default, so just hit 'Enter' to remove it.
139+
Again, the answer here is the default, so just hit ++enter++ to remove it.
140140

141141
Finally, the dialog asks you if you want to reload the privileges:
142142

143-
```
143+
```text
144144
- Dropping test database...
145145
... Success!
146146
- Removing privileges on test database...
@@ -152,9 +152,9 @@ will take effect immediately.
152152
Reload privilege tables now? [Y/n]
153153
```
154154

155-
Again, hit 'Enter' to do this. If all goes well, you will receive this message:
155+
Again, hit ++enter++ to do this. If all goes well, you will receive this message:
156156

157-
```
157+
```text
158158
... Success!
159159
160160
Cleaning up...
@@ -169,23 +169,23 @@ MariaDB will now be ready to use.
169169

170170
### Rocky 9.0 changes
171171

172-
Rocky Linux 9.0 uses `mariadb-server-10.5.13-2` as the default mariadb-server version. As of version 10.4.3, a new plugin is automatically enabled in the server which changes the `mariadb-secure-installation` dialog. That plugin is `unix-socket` authentication. [This article](https://mariadb.com/kb/en/authentication-plugin-unix-socket/) explains the new feature well. Essentially, using unix-socket authentication uses the logged-in user's credentials to access the database. It makes it so that if the root user, for example, logs in and then uses `mysqladmin` to create or delete a database (or any other function) that no password is needed for access. Same works with `mysql`. It also means there is no password to compromise remotely. This depends on the security of the users set up on the server for all of the database protection.
172+
Rocky Linux 9.0 uses `mariadb-server-10.5.13-2` as the default mariadb-server version. As of version 10.4.3, a new plugin is automatically enabled in the server which changes the `mariadb-secure-installation` dialog. That plugin is `unix-socket` authentication. [This article](https://mariadb.com/kb/en/authentication-plugin-unix-socket/) explains the new feature well. Essentially, using unix-socket authentication uses the logged-in user's credentials to access the database. It makes it so that if the root user, for example, logs in and then uses `mysqladmin` to create or delete a database (or any other function) that no password is needed for access. Same works with `mysql`. It also means there is no password to compromise remotely. This depends on the security of the users set up on the server for all of the database protection.
173173

174174
The second dialog during the `mariadb-secure-installation` after the password is set for the administrative user is:
175175

176-
```
176+
```text
177177
Switch to unix_socket authentication Y/n
178178
```
179179

180180
The default here is "Y", but even if you answer "n", with the plugin enabled, a password is not requested for the user, at least not from the command line interface. You can specify either password or no password and they both work:
181181

182-
```
182+
```bash
183183
mysql
184184

185185
MariaDB [(none)]>
186186
```
187187

188-
```
188+
```bash
189189
mysql -p
190190
Enter password:
191191

@@ -196,4 +196,4 @@ For more information on this feature, refer to the link above. There is a way to
196196

197197
## Conclusion
198198

199-
A database server, such as _mariadb-server_, can be used for many purposes. Because of the popularity of the Wordpress CMS, it is often found on web servers. Before you run the database in production, however, it is a good idea to strengthen its security.
199+
A database server, such as *mariadb-server*, can be used for many purposes. Because of the popularity of the Wordpress CMS, it is often found on web servers. Before you run the database in production, however, it is a good idea to strengthen its security.

0 commit comments

Comments
 (0)