1
0
mirror of https://github.com/tommytran732/Pterodactyl-Script synced 2024-11-22 18:41:32 -05:00

Fixed Issues with MariaDB on Ubuntu 18.04

Added /etc/mysql/mariadb.conf.d/50-server.cnf as another config file to check.
This commit is contained in:
TommyTran732 2020-06-25 16:39:44 -04:00 committed by GitHub
parent d5da0e9e53
commit 0621af1cab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -536,18 +536,23 @@ install_pterodactyl() {
output "Binding MariaDB/MySQL to 0.0.0.0." output "Binding MariaDB/MySQL to 0.0.0.0."
if [ -f /etc/mysql/my.cnf ] ; then if [ -f /etc/mysql/my.cnf ] ; then
sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.cnf sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.cnf
sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.cnf sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.cnf
output 'Restarting MySQL process...' output 'Restarting MySQL process...'
service mysql restart service mysql restart
elif [ -f /etc/my.cnf ] ; then elif [ -f /etc/my.cnf ] ; then
sed -i -- 's/bind-address/# bind-address/g' /etc/my.cnf sed -i -- 's/bind-address/# bind-address/g' /etc/my.cnf
sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/my.cnf sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/my.cnf
output 'Restarting MySQL process...' output 'Restarting MySQL process...'
service mysql restart service mysql restart
elif [ -f /etc/mysql/my.conf.d/mysqld.cnf ] ; then elif [ -f /etc/mysql/my.conf.d/mysqld.cnf ] ; then
sed -i -- 's/bind-address/# bind-address/g' /etc/my.cnf sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.conf.d/mysqld.cnf
sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/my.cnf sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.conf.d/mysqld.cnf
output 'Restarting MySQL process...'
service mysql restart
elif [ -f /etc/mysql/mariadb.conf.d/50-server.cnf ] ; then
sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/mariadb.conf.d/50-server.cnf
output 'Restarting MySQL process...' output 'Restarting MySQL process...'
service mysql restart service mysql restart
else else