Skip to content

Commit a1211a4

Browse files
committed
Deb: use MariaDB naming
Use MariaDB named executables. Also remove unnecessary slave references. rename 50-mysql-clients.cnf -> 50-mariadb-clients.cnf 50-mysqld_safe.cnf -> 50-mariadb_safe.cnf
1 parent a75cd0a commit a1211a4

File tree

6 files changed

+44
-45
lines changed

6 files changed

+44
-45
lines changed

debian/additions/mariadb.conf.d/50-mysql-clients.cnf renamed to debian/additions/mariadb.conf.d/50-mariadb-clients.cnf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
# Use it for options that affect only one utility
44
#
55

6-
[mysql]
6+
[mariadb-client]
77

88
[mariadb-upgrade]
99

10-
[mysqladmin]
10+
[mariadb-admin]
1111

12-
[mysqlbinlog]
12+
[mariadb-binlog]
1313

14-
[mysqlcheck]
14+
[mariadb-check]
1515

16-
[mysqldump]
16+
[mariadb-dump]
1717

18-
[mysqlimport]
18+
[mariadb-import]
1919

20-
[mysqlshow]
20+
[mariadb-show]
2121

22-
[mysqlslap]
22+
[mariadb-slap]

debian/additions/mariadb.conf.d/50-mysqld_safe.cnf renamed to debian/additions/mariadb.conf.d/50-mariadb_safe.cnf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# For similar behavior, systemd users should create the following file:
55
# /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
66
#
7-
# To achieve the same result as the default 50-mysqld_safe.cnf, please create
7+
# To achieve the same result as the default 50-mariadb_safe.cnf, please create
88
# /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
99
# with the following contents:
1010
#
@@ -14,11 +14,11 @@
1414
# StandardError = syslog
1515
# SyslogFacility = daemon
1616
# SyslogLevel = err
17-
# SyslogIdentifier = mysqld
17+
# SyslogIdentifier = mariadbd
1818
#
1919
# For more information, please read https://mariadb.com/kb/en/mariadb/systemd/
2020

21-
[mysqld_safe]
21+
[mariadbd-safe]
2222
# This will be passed to all mysql clients
2323
# It has been reported that passwords should be enclosed with ticks/quotes
2424
# especially if they contain "#" chars...

debian/additions/mariadb.conf.d/50-server.cnf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# this is read by the standalone daemon and embedded servers
66
[server]
77

8-
# this is only for the mysqld standalone daemon
9-
[mysqld]
8+
# this is only for the mariadbd daemon
9+
[mariadbd]
1010

1111
#
1212
# * Basic Settings
@@ -52,7 +52,7 @@ bind-address = 127.0.0.1
5252

5353
# When running under systemd, error logging goes via stdout/stderr to journald
5454
# and when running legacy init error logging goes to syslog due to
55-
# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
55+
# /etc/mysql/conf.d/mariadb.conf.d/50-mariadb_safe.cnf
5656
# Enable this if you want to have error logging into a separate file
5757
#log_error = /var/log/mysql/error.log
5858
# Enable the slow query log to see queries with especially long duration
@@ -63,8 +63,8 @@ bind-address = 127.0.0.1
6363
#log_slow_min_examined_row_limit = 1000
6464

6565
# The following can be used as easy to replay backup logs or for replication.
66-
# note: if you are setting up a replication slave, see README.Debian about
67-
# other settings you may need to change.
66+
# note: if you are setting up a replica, see README.Debian about other
67+
# settings you may need to change.
6868
#server-id = 1
6969
#log_bin = /var/log/mysql/mysql-bin.log
7070
expire_logs_days = 10
@@ -106,7 +106,7 @@ collation-server = utf8mb4_general_ci
106106
# This group is only read by MariaDB servers, not by MySQL.
107107
# If you use the same .cnf file for MySQL and MariaDB,
108108
# you can put MariaDB-only options here
109-
[mariadb]
109+
[mariadbd]
110110

111111
# This group is only read by MariaDB-11.0 servers.
112112
# If you use the same .cnf file for MariaDB of different versions,

debian/mariadb-client.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
debian/additions/innotop/innotop usr/bin/
22
debian/additions/mariadb-report usr/bin/
33
debian/additions/mariadb.conf.d/50-client.cnf etc/mysql/mariadb.conf.d
4-
debian/additions/mariadb.conf.d/50-mysql-clients.cnf etc/mysql/mariadb.conf.d
4+
debian/additions/mariadb.conf.d/50-mariadb-clients.cnf etc/mysql/mariadb.conf.d
55
debian/additions/mariadb.conf.d/60-galera.cnf etc/mysql/mariadb.conf.d
66
usr/bin/mariadb-access
77
usr/bin/mariadb-admin

debian/mariadb-server.README.Debian

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
* MYSQL WON'T START OR STOP?
2-
============================
1+
* MARIADB WON'T START OR STOP?
2+
==============================
33

44
The most common reasons the server does not start are:
55
- AppArmor is enforced and something is wrong with the confinement profile.
@@ -10,12 +10,12 @@ First check the contents of syslog (or systemd journal) and then check the
1010
logs at /var/log/mysql/ for any hints of what might be wrong.
1111

1212
Examples:
13-
grep mysql /var/log/syslog
13+
grep mariadbd /var/log/syslog
1414
journalctl -u mariadb
1515

1616

17-
* NEW SERVICE NAME, PROCESS AND BINARY NAMES IN MARIADB 10.5
18-
============================================================
17+
* NEW SERVICE NAME, PROCESS AND BINARY NAMES SINCE MARIADB 10.5
18+
===============================================================
1919

2020
Starting form MariaDB 10.5, the default SysV init service name is 'mariadb',
2121
and can be accessed at path /etc/init.d/mariadb. The alias 'mysql' is only
@@ -38,7 +38,7 @@ https://mariadb.com/kb/en/mariadb/systemd/
3838

3939

4040
* MIXING PACKAGES FROM MARIADB.ORG AND OFFICIAL DEBIAN REPOSITORIES
41-
==================================================================
41+
===================================================================
4242

4343
Please note that the MariaDB packaging in official Debian repositories are of
4444
a completely new generation compared to the legacy packaging used in MariaDB.org
@@ -57,10 +57,10 @@ revision string.
5757

5858
On new installs no root password is set and no debian-sys-maint user is
5959
created anymore. Instead the MariaDB root account is set to be authenticated
60-
using the Unix socket, e.g. any mysqld invocation by root or via sudo will
61-
let the user see the mysqld prompt.
60+
using the Unix socket, e.g. any mariadb invocation by root or via sudo will
61+
let the user see the MariaDB prompt.
6262

63-
You may never ever delete the mysql user "root". Although it has no password
63+
You may never ever delete the MariaDB user "root". Although it has no password
6464
is set, the unix_auth plugin ensure that it can only be run locally as the root
6565
user.
6666

@@ -84,14 +84,14 @@ MariaDB in Debian is secure by default, because:
8484
- There is no root account with password anymore. The system admin needs to
8585
create one themselves if they need it. With no password, all issues related
8686
to password management and password leaking are gone. Sysadmins can access
87-
the database without a password simply by running 'sudo mysql' thanks to
87+
the database without a password simply by running 'sudo mariadb' thanks to
8888
socket based authentication, which detects the system root user and allows
89-
them to use the mysqld console as the mysql root user. For details see
89+
them to use the mariadb console as the MariaDB root user. For details see
9090
https://www.slideshare.net/ottokekalainen/less-passwords-more-security-unix-socket-authentication-and-other-mariadb-hardening-tips
9191
- There is no test database nor test accounts in the out-of-the-box Debian
9292
installation.
9393

94-
Therefore there is also no need to run the 'mysql_secure_installation'. In fact
94+
Therefore there is also no need to run the 'mariadb-secure-installation'. In fact
9595
that script will try to do things that are already prevented, and might fail.
9696

9797

@@ -109,11 +109,11 @@ scripts do that automatically.
109109
* WHAT TO DO AFTER INSTALLATION
110110
===============================
111111

112-
The MySQL manual describes certain steps to do at this stage in a separate
112+
The MariaDB manual describes certain steps to do at this stage in a separate
113113
chapter. They are not necessary as the Debian packages does them
114114
automatically.
115115

116-
There should not be any need to run 'mysql_install_db' manually, as the install
116+
There should not be any need to run 'mariadb-install-db' manually, as the install
117117
scripts do that automatically.
118118

119119
The only thing that is left over for the admin is
@@ -125,7 +125,7 @@ The only thing that is left over for the admin is
125125
============
126126

127127
For security reasons, the Debian package has enabled networking only on the
128-
loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
128+
loop-back device using "bind-address" in /etc/mysql/mariadb.cnf. Check with
129129
"netstat -tlnp" where it is listening. If your connection is aborted
130130
immediately check your firewall rules or network routes.
131131

@@ -145,16 +145,16 @@ If your local Unix account is the one you want to have local super user
145145
access on your database with you can create the following account that will
146146
only work for the local Unix user connecting to the database locally.
147147

148-
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO '$USER'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION"
148+
sudo /usr/bin/mariadb -e "GRANT ALL ON *.* TO '$USER'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION"
149149

150150
To create a local machine account username=USERNAME with a password:
151151

152-
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION"
152+
sudo /usr/bin/mariadb -e "GRANT ALL ON *.* TO 'USERNAME'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION"
153153

154154
To create a USERNAME user with password 'password' admin user that can access
155155
the DB server over the network:
156156

157-
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION"
157+
sudo /usr/bin/mariadb -e "GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION"
158158

159159
Scripts should run as a user who have the required grants and be identified via unix_socket.
160160

@@ -175,13 +175,12 @@ https://mariadb.com/kb/en/configuring-mariadb-with-mycnf/.
175175
* FURTHER NOTES ON REPLICATION
176176
==============================
177177

178-
If the MySQL server is acting as a replication slave, you should not
179-
set --tmpdir to point to a directory on a memory-based file system or to
180-
a directory that is cleared when the server host restarts. A replication
181-
slave needs some of its temporary files to survive a machine restart so
182-
that it can replicate temporary tables or LOAD DATA INFILE operations. If
183-
files in the temporary file directory are lost when the server restarts,
184-
replication fails.
178+
If the MariaDB server is acting as a replica, you should not set --tmpdir to
179+
point to a directory on a memory-based file system or to a directory that is
180+
cleared when the server host restarts. A replica needs some of its temporary
181+
files to survive a machine restart so that it can replicate temporary tables
182+
or LOAD DATA INFILE operations. If files in the temporary file directory are
183+
lost when the server restarts, replication fails.
185184

186185

187186
* DOWNGRADING
@@ -193,7 +192,7 @@ You might get lucky downgrading a few minor versions without issued. Take a
193192
backup first. If you break it you get to keep both pieces. Do a restore from
194193
backup or upgrade to the previous version.
195194

196-
If doing a major version downgrade, take a mysqldump/maria-backup consistent
195+
If doing a major version downgrade, take a mariadb-dump/maria-backup consistent
197196
backup using the current version and reload after downgrading and purging
198197
existing databases.
199198

debian/mariadb-server.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
debian/additions/debian-start etc/mysql
22
debian/additions/debian-start.inc.sh usr/share/mysql
33
debian/additions/echo_stderr usr/share/mysql
4-
debian/additions/mariadb.conf.d/50-mysqld_safe.cnf etc/mysql/mariadb.conf.d
4+
debian/additions/mariadb.conf.d/50-mariadb_safe.cnf etc/mysql/mariadb.conf.d
55
debian/additions/mariadb.conf.d/50-server.cnf etc/mysql/mariadb.conf.d
66
debian/additions/source_mariadb.py usr/share/apport/package-hooks
77
etc/apparmor.d/usr.sbin.mariadbd

0 commit comments

Comments
 (0)