mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
Fill in MySQL server installation directions.
This commit is contained in:
parent
6f450457ef
commit
cc63d069f6
@ -2,28 +2,35 @@
|
|||||||
|
|
||||||
This guide will show you how to prepare a MySQL or MariaDB database for PowerDNS-Admin.
|
This guide will show you how to prepare a MySQL or MariaDB database for PowerDNS-Admin.
|
||||||
|
|
||||||
We assume the database is installed per your platform's directions (apt, yum, etc).
|
Directions to do this can be found below:
|
||||||
|
- MariaDB:
|
||||||
|
- https://mariadb.com/kb/en/getting-installing-and-upgrading-mariadb/
|
||||||
|
- https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-ubuntu-20-04
|
||||||
|
- MySQL:
|
||||||
|
- https://dev.mysql.com/downloads/mysql/
|
||||||
|
- https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
|
||||||
|
|
||||||
|
We assume the database is installed per your platform's directions (apt, yum, etc). The following directions assume a default configuration and for productions setups `mysql_secure_installation` has been run.
|
||||||
|
|
||||||
## Setup database:
|
## Setup database:
|
||||||
|
|
||||||
Connect to the database (Usually using `mysql -u root -p` - then enter your MySQL/MariaDB root users password if applicable), then enter the following:
|
Connect to the database (Usually using `mysql -u root -p` if a password has been set on the root database user or `sudo mysql` if not), then enter the following:
|
||||||
```
|
```
|
||||||
CREATE DATABASE `powerdnsadmin` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
CREATE DATABASE `powerdnsadmin` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
GRANT ALL PRIVILEGES ON `powerdnsadmin`.* TO 'pdnsadminuser'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD_HERE';
|
GRANT ALL PRIVILEGES ON `powerdnsadmin`.* TO 'pdnsadminuser'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD_HERE';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
quit
|
|
||||||
```
|
```
|
||||||
- If your database server is located on a different machine then change 'localhost' to '%'
|
- If your database server is located on a different machine then change 'localhost' to '%'
|
||||||
- Replace YOUR_PASSWORD_HERE with a secure password.
|
- Replace YOUR_PASSWORD_HERE with a secure password.
|
||||||
|
|
||||||
|
Once there are no errors you can type `quit` in the mysql shell to exit from it.
|
||||||
|
|
||||||
## Install required packages:
|
## Install required packages:
|
||||||
### Red-hat based systems:
|
### Red-hat based systems:
|
||||||
```
|
```
|
||||||
yum install MariaDB-shared mariadb-devel mysql-community-devel
|
yum install MariaDB-shared mariadb-devel mysql-community-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
If you use MariaDB ( from [MariaDB repositories](https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/) )
|
|
||||||
|
|
||||||
### Debian based systems:
|
### Debian based systems:
|
||||||
```
|
```
|
||||||
apt install libmysqlclient-dev
|
apt install libmysqlclient-dev
|
||||||
@ -34,7 +41,6 @@ apt install libmysqlclient-dev
|
|||||||
pip3 install mysqlclient==2.0.1
|
pip3 install mysqlclient==2.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Known issues:
|
## Known issues:
|
||||||
|
|
||||||
Problem: If you plan to manage large zones, you may encounter some issues while applying changes. This is due to PowerDNS-Admin trying to insert the entire modified zone into the column history.detail.
|
Problem: If you plan to manage large zones, you may encounter some issues while applying changes. This is due to PowerDNS-Admin trying to insert the entire modified zone into the column history.detail.
|
||||||
@ -42,7 +48,9 @@ Problem: If you plan to manage large zones, you may encounter some issues while
|
|||||||
Using MySQL/MariaDB, this column is created by default as TEXT and thus limited to 65,535 characters.
|
Using MySQL/MariaDB, this column is created by default as TEXT and thus limited to 65,535 characters.
|
||||||
|
|
||||||
Solution: Convert the column to MEDIUMTEXT:
|
Solution: Convert the column to MEDIUMTEXT:
|
||||||
```
|
1. Connect to the database shell as described in the setup database section:
|
||||||
USE powerdnsadmin;
|
2. Execute the following commands:
|
||||||
ALTER TABLE history MODIFY detail MEDIUMTEXT;
|
```
|
||||||
```
|
USE powerdnsadmin;
|
||||||
|
ALTER TABLE history MODIFY detail MEDIUMTEXT;
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user