User Tools

Site Tools


en:manuals:ehr:install:mariadb

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:manuals:ehr:install:mariadb [2018/03/13 15:50]
Jérôme Pinguet
en:manuals:ehr:install:mariadb [2018/03/13 15:54]
Jérôme Pinguet
Line 86: Line 86:
 The user should be //​freehealth//​ or equivalent to root and be able to read the mysql database: The user should be //​freehealth//​ or equivalent to root and be able to read the mysql database:
 <​code>​SELECT User FROM mysql.user;</​code>​ <​code>​SELECT User FROM mysql.user;</​code>​
 +
 +==== I can't connect to the server from another machine in the network ====
 +
 +=== Is MariaDB server up and running? ===
 +
 +    systemctl status mariadb.service
 +    ​
 +    ● mariadb.service - MariaDB database server
 +   ​Loaded:​ loaded (/​lib/​systemd/​system/​mariadb.service;​ enabled; vendor preset: enabled)
 +  Drop-In: /​etc/​systemd/​system/​mariadb.service.d
 +           ​└─migrated-from-my.cnf-settings.conf
 +   ​Active:​ active (running) since Sat 2017-08-05 21:23:16 CEST; 2min 52s ago
 +   
 +If you see "​active (running)",​ it is up and running.
 +
 +=== bind-address in my.cnf ===
 +
 +In /​etc/​mysql/​my.cnf
 +
 +    ​
 +If you set '​bind-address'​ to '::'​ MariaDB will accept IPv4 and IPv6 connections from the network (both Local Area Network and Wide Area Network aka Internet). ​
 +
 +    [mysqld]
 +    bind-address = ::
 +    ​
 +=== Firewall ===
 +
 +If my.cnf is set correctly and you still cannot connect, it could be the firewall.
 +Some VPS providers and/or some GNU/Linux distributions install a firewall by default.
 +
 +== ufw ==
 +UFW aka Uncomplicated Firewall comes by default with Ubuntu. Allow tcp traffic on port 3306:
 +
 +    ufw allow 3306/tcp
 +    service ufw restart
 +    systemctl restart mariadb.service
 +    ​
 +== iptables ==
 +
 +Debian comes with IPTables configured to allow all traffic, but someone or something could have changed the rules since installation.
 +
 +Check your iptables rules:
 +    iptables --list
 +    ​
 +    iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
 +    systemctl restart mariadb.service
  
 ==== Previous MySQL installation ==== ==== Previous MySQL installation ====
en/manuals/ehr/install/mariadb.txt · Last modified: 2018/03/13 15:55 by Jérôme Pinguet