Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
2.2. Install the Database Server
2.2.1. Install the MariaDB Database Packages Link kopierenLink in die Zwischenablage kopiert!
- mariadb-galera-server
- Provides the MariaDB database service.
- mariadb-galera-common
- Provides the MariaDB service shared files. This package is installed as a dependency of the mariadb-galera-server package.
- galera
- Installs the Galera wsrep (Write Set REPlication) provider. This package is installed as a dependency of the mariadb-galera-server package.
yum install mariadb-galera-server
# yum install mariadb-galera-server
2.2.2. Configure the Firewall to Allow Database Traffic Link kopierenLink in die Zwischenablage kopiert!
root
user.
Procedure 2.3. Configuring the Firewall to Allow Database Traffic
- Open the
/etc/sysconfig/iptables
file in a text editor. - Add an INPUT rule allowing TCP traffic on port
3306
to the file. The new rule must appear before any INPUT rules that REJECT traffic:-A INPUT -p tcp -m multiport --dports 3306 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 3306 -j ACCEPT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes to the
/etc/sysconfig/iptables
file. - Restart the
iptables
service to ensure that the change takes effect:systemctl restart iptables.service
# systemctl restart iptables.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.3. Start the Database Service Link kopierenLink in die Zwischenablage kopiert!
root
user.
Procedure 2.4. Starting the Database Service
- Start the
mariadb
service:systemctl start mariadb.service
# systemctl start mariadb.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the
mariadb
service to start at boot time:systemctl enable mariadb.service
# systemctl enable mariadb.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.4. Configure the Database Administrator Account Link kopierenLink in die Zwischenablage kopiert!
root
that provides access to the MariaDB service from the machine on which the MariaDB service was installed. You must set a password for this account to secure access to the server hosting the MariaDB service. You must also enable access to the MariaDB service from machines other than the machine on which the MariaDB server is installed. It is also recommended that you remove the anonymous user and test database that are created during installation.
Procedure 2.5. Configuring the Database Administrator Account
- Log in to the machine on which the MariaDB service is installed.
- Use the
mysql_secure_installation
to set theroot
password, allow remote root login, and remove the anonymous user account and test database:mysql_secure_installation
# mysql_secure_installation
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
-p
and the old password:
mysqladmin -u root -pOLDPASS password NEWPASS
# mysqladmin -u root -pOLDPASS password NEWPASS
2.2.5. Test Connectivity Link kopierenLink in die Zwischenablage kopiert!
2.2.5.1. Test Local Connectivity Link kopierenLink in die Zwischenablage kopiert!
Procedure 2.6. Testing Local Connectivity
- Connect to the database service, replacing
USER
with the user name with which to connect:mysql -u USER -p
# mysql -u USER -p
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enter the password of the database user when prompted.
Enter password:
Enter password:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.5.2. Test Remote Connectivity Link kopierenLink in die Zwischenablage kopiert!
Procedure 2.7. Testing Remote Connectivity
- Install the MySQL client tools:
yum install mysql
# yum install mysql
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Connect to the database service, replacing USER with the database user name and HOST with the IP address or host name of the server hosting the database service:
mysql -u USER -h HOST -p
# mysql -u USER -h HOST -p
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enter the password of the database user when prompted:
Enter password:
Enter password:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow