14/2/2023

OpenSUSE 15.4 mariadb server bereikbaar maken

Filed under: — cybrarian @ 3:47 pm

Via zypper mariadb als database geïnstalleerd.

De database kan gestart worden met systemctl start mysql

Ik heb via zypper geprobeerd phpMyAdmin bij te installeren, maar is nog niet beschikbaar/aktief.

Eerst de database naar buiten beschikbaar maken:

Zet firewall open voor mysql:

– in Yast, security/users, firewall, Zones public:
Services: mysql, Add -> Allowed (naast dhcpv6-client en ssh)
(bij ports staan al 80 en 443 omdat ik apache2 heb geïnstalleerd en werkt)
– in yast bewaren met Accept, en afsluiten.

nc -v server.bremen.loc 3306

nc: connect to server.bremen.loc port 3306 (tcp) failed: Connection refused

systemctl stop mysql

Configuratiebestand mariadb/mysql: /etc/my.cnf
zoek:

bind-address=127.0.0.1

Afzetten:
# bind-address=127.0.0.1 (met comment ervoor)
(of bind-address = * (??)

Bewaar, herstart mysql/mariadb met systemctl start mysql

nc -v server.bremen.loc 3306

Connection to server.bremen.loc 3306 port [tcp/mysql] succeeded!
H�jHost ‘192.168.1.05’ is not allowed to connect to this MariaDB server

Om in te loggen moet er natuurlijk een geschikte user zijn gemaakt in mariadb.

CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'XXXXXXXXXXXXXXXXXX'
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
flush privileges;

Reacties zijn gesloten.

Powered by WordPress