linux_wiki:network_services_overview_database_services

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:network_services_overview_database_services [2016/10/01 15:40]
billdozor [Install the packages needed to provide the service]
linux_wiki:network_services_overview_database_services [2019/05/25 23:50] (current)
Line 1: Line 1:
-====== Network Services Overview Database Services ======+====== Network Services OverviewDatabase Services ======
  
 **General Information** **General Information**
  
-This page covers the Network Services objectives, specifically for <service-name>+This page covers the Network Services objectives, specifically for MariaDB
  
 **Network Services Objectives** **Network Services Objectives**
Line 12: Line 12:
   * Configure the service for basic operation   * Configure the service for basic operation
   * Configure host-based and user-based security for the service   * Configure host-based and user-based security for the service
 +
 +----
 +
 +====== Lab Setup ======
 +
 +The following virtual machines will be used:
 +  * server1.example.com (192.168.1.150) -> Perform any client testing here
 +  * server2.example.com (192.168.1.151) -> Install the database here
  
 ---- ----
Line 23: Line 31:
   * mariadb -> the client   * mariadb -> the client
   * mariadb-server -> the server   * mariadb-server -> the server
 +
 +\\
 +Documentation (what can go in the /etc/my.cnf config)
 +<code bash>
 +/usr/libexec/mysqld --verbose --help | less
 +
 +# then search for 'Variables'
 +/Variables    <enter>
 +</code>
  
 ---- ----
Line 37: Line 54:
  
   * Examples: "man semanage-port" has examples for allowing non-standard ports   * Examples: "man semanage-port" has examples for allowing non-standard ports
-  * Tip: To see current port labels<code bash>semanage port -l | grep mariadb</code>+  * Tip: To see current port labels<code bash>semanage port -l | grep mysql</code>
  
 \\ \\
Line 58: Line 75:
 SELinux: Allow mariadb to use the new port SELinux: Allow mariadb to use the new port
 <code bash> <code bash>
-semanage port -a -t mysqld_port_t 5502 -p tcp+semanage port -a -t mysqld_port_t -p tcp 5502
 </code> </code>
  
Line 66: Line 83:
 systemctl restart mariadb systemctl restart mariadb
 </code> </code>
 +
 +\\
 +Remote clients would need to connect like this example (specifying a port)<code bash>mysql -h 192.168.1.151 --port=5502 -u root -p</code>
 +  * -h 192.168.1.151  -> Remote hostname to connect to (can be an IP)
 +  * --port=5502  -> Use this remote port
 +  * -u root  -> Database username
 +  * -p  -> Prompt for password
  
 ---- ----
Line 73: Line 97:
 Check Current Service Status Check Current Service Status
 <code bash> <code bash>
-systemctl status <service-name>+systemctl status mariadb
 </code> </code>
   * Also displays if the service is enabled or disabled   * Also displays if the service is enabled or disabled
Line 80: Line 104:
 Enabling a service to start on boot Enabling a service to start on boot
 <code bash> <code bash>
-systemctl enable <service-name>+systemctl enable mariadb
 </code> </code>
  
Line 89: Line 113:
 Enable and Start the service Enable and Start the service
 <code bash> <code bash>
-systemctl enable <service-name> +systemctl enable mariadb 
-systemctl start <service-name>+systemctl start mariadb
 </code> </code>
  
Line 101: Line 125:
 Allow access through the firewall Allow access through the firewall
 <code bash> <code bash>
-firewall-cmd --permanent --add-service=<service-name>+firewall-cmd --permanent --add-service=mysql
 firewall-cmd --reload firewall-cmd --reload
 </code> </code>
  • linux_wiki/network_services_overview_database_services.1475350813.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)