Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:install_and_configure_mariadb [2016/10/01 16:14] billdozor [MariaDB: User Management] |
linux_wiki:install_and_configure_mariadb [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
---- | ---- | ||
- | ====== MariaDB: Install and Initial Config ====== | + | ====== 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 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== MariaDB | ||
Install the server and client utilities | Install the server and client utilities | ||
Line 33: | Line 41: | ||
mysql_secure_installation | mysql_secure_installation | ||
</ | </ | ||
+ | * Prompted for current root password (should be blank because of fresh install, just press ENTER) | ||
* Prompted to set a root password | * Prompted to set a root password | ||
* Other options | * Other options | ||
Line 86: | Line 95: | ||
---- | ---- | ||
- | ====== MariaDB: User Management ====== | + | ====== MariaDB |
Create a new user | Create a new user | ||
Line 94: | Line 103: | ||
* User login from any host: " | * User login from any host: " | ||
* User login from specific host: " | * User login from specific host: " | ||
+ | * **HELP**< | ||
+ | |||
+ | \\ | ||
+ | Pre-Req: Create a quick database for the user to have permissions for<code bash> | ||
\\ | \\ | ||
Line 101: | Line 114: | ||
</ | </ | ||
* Grants the commands on the database " | * Grants the commands on the database " | ||
+ | * **HELP**< | ||
\\ | \\ | ||
Line 141: | Line 155: | ||
MariaDB Server: Grant privileges to root from the client IP address and flush privileges | MariaDB Server: Grant privileges to root from the client IP address and flush privileges | ||
<code bash> | <code bash> | ||
- | MariaDB [(none)]> | + | MariaDB [(none)]> |
MariaDB [(none)]> | MariaDB [(none)]> | ||
+ | MariaDB [(none)]> | ||
</ | </ | ||
* If you don't flush privileges, you could get inconsistent behaviour. | * If you don't flush privileges, you could get inconsistent behaviour. | ||
+ | * The password for root and be different for this remote grant. This allows you to have different root password' | ||
+ | * FYI: ' | ||
+ | |||
+ | \\ | ||
+ | MariaDB Server: Open up the firewall to allow mysql connections (if you have not already) | ||
+ | <code bash> | ||
+ | firewall-cmd --permanent --add-service=mysql | ||
+ | firewall-cmd --reload | ||
+ | </ | ||
\\ | \\ | ||
- | MariaDB Remote Client: Install components to remotely manage | + | **MariaDB Remote Client**: Install components to remotely manage |
<code bash> | <code bash> | ||
yum install mariadb | yum install mariadb | ||
Line 153: | Line 177: | ||
\\ | \\ | ||
- | MariaDB Remote Client: Connect remotely | + | **MariaDB Remote Client**: Connect remotely |
<code bash> | <code bash> | ||
- | mysql -h 192.168.1.200 -u root -p | + | mysql -h 192.168.1.151 -u root -p |
</ | </ | ||