Rechercher dans le manuel MySQL
22.5.12.3 NDB Cluster and MySQL Security Procedures
In this section, we discuss MySQL standard security procedures as they apply to running NDB Cluster.
In general, any standard procedure for running MySQL securely
also applies to running a MySQL Server as part of an NDB
Cluster. First and foremost, you should always run a MySQL
Server as the mysql
operating system user;
this is no different from running MySQL in a standard
(non-Cluster) environment. The mysql
system
account should be uniquely and clearly defined. Fortunately,
this is the default behavior for a new MySQL installation. You
can verify that the mysqld process is running
as the mysql
operating system user by using
the system command such as the one shown here:
shell> ps aux | grep mysql
root 10467 0.0 0.1 3616 1380 pts/3 S 11:53 0:00 \
/bin/sh ./mysqld_safe --ndbcluster --ndb-connectstring=localhost:1186
mysql 10512 0.2 2.5 58528 26636 pts/3 Sl 11:53 0:00 \
/usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql \
--datadir=/usr/local/mysql/var --user=mysql --ndbcluster \
--ndb-connectstring=localhost:1186 --pid-file=/usr/local/mysql/var/mothra.pid \
--log-error=/usr/local/mysql/var/mothra.err
jon 10579 0.0 0.0 2736 688 pts/0 S+ 11:54 0:00 grep mysql
If the mysqld process is running as any other
user than mysql
, you should immediately shut
it down and restart it as the mysql
user. If
this user does not exist on the system, the
mysql
user account should be created, and
this user should be part of the mysql
user
group; in this case, you should also make sure that the MySQL
data directory on this system (as set using the
--datadir
option for
mysqld) is owned by the
mysql
user, and that the SQL node's
my.cnf
file includes
user=mysql
in the [mysqld]
section. Alternatively, you can start the MySQL server process
with --user=mysql
on the command
line, but it is preferable to use the
my.cnf
option, since you might forget to
use the command-line option and so have
mysqld running as another user
unintentionally. The mysqld_safe startup
script forces MySQL to run as the mysql
user.
Never run mysqld as the system root user. Doing so means that potentially any file on the system can be read by MySQL, and thus—should MySQL be compromised—by an attacker.
As mentioned in the previous section (see Section 22.5.12.2, “NDB Cluster and MySQL Privileges”), you should always set a root password for the MySQL Server as soon as you have it running. You should also delete the anonymous user account that is installed by default. You can accomplish these tasks using the following statements:
- shell> mysql -u root
Be very careful when executing the
DELETE
statement not to omit the
WHERE
clause, or you risk deleting
all MySQL users. Be sure to run the
FLUSH PRIVILEGES
statement as
soon as you have modified the mysql.user
table, so that the changes take immediate effect. Without
FLUSH PRIVILEGES
, the changes do
not take effect until the next time that the server is
restarted.
Many of the NDB Cluster utilities such as
ndb_show_tables,
ndb_desc, and
ndb_select_all also work without
authentication and can reveal table names, schemas, and data.
By default these are installed on Unix-style systems with the
permissions wxr-xr-x
(755), which means
they can be executed by any user that can access the
mysql/bin
directory.
See Section 22.4, “NDB Cluster Programs”, for more information about these utilities.
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-mysql-cluster-security-mysql-security-procedures.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.