Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1909  / 2 Years ago, mon, november 7, 2022, 5:09:12

Again I have a problem with my special friend MySQL :D

I have got two servers - a database-server and a web-server - which are connected via VLAN.


Now I want the web-server to have remote access to the database-server's MySQL. So I created the user user in mysql.user.


user's Host is xxx.yyy.zzz.9 which is the internal IP-address of the web-server.


xxx.yyy.zzz.0 is the network. I also created user with Host % .


As long as I use MySQL on the database-server logging in as user, everything works fine. But trying to log in as user from xxx.yyy.zzz.9 using


mysql -h xxx.yyy.zzz.8 -u user -p

(where xxx.yyy.zzz.8 is the database-server's internal IP), I get


ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.yyy.zzz.8' (110)  

So I tried to activate Bind-Address in the my.cnf file. Well, if I use xxx.yyy.zzz.8, nothing changes. But if I try xxx.yyy.zzz.9 and try to restart MySQL, I get


mysql stop/waiting
start: Job failed to start

I checked the log files and found - nothing. The database-server's MySQL doesn't even register, that the web-server tries to connect remotely.


My idea is that maybe I didn't configure the VLAN properly, even though I asked someone who actually knows such stuff and he told me I did everything right.


What I wrote in /etc/networking/interfaces is:


#The VLAN
auto eth1
iface eth1 inet static
address xxx.yyy.zzz..8
netmask 255.255.255.0
network xxx.yyy.zzz.0
broadcast xxx.yyy.zzz.255
mtu 1500

ifconfig returns


eth1      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxx  
inet addr:xxx.yyy.zzz.8 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:241146 errors:0 dropped:0 overruns:0 frame:0
TX packets:9765 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17825995 (17.8 MB) TX bytes:566602 (566.6 KB)
Memory:fb900000-fb920000

for the eth1, what is, what I configured. (This is for the database-server, the web-server looks similar).


ethtool eth1 returns:


Settings for eth1:

Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000003 (3)
drv probe
Link detected: yes

(This is for the database-server, the web-server looks similar).


I commented out Bind-Address in my.cnf after it didn't work.


More From » networking

 Answers
3

I got it!


The service psa-firewall, which is activated and configured by Plesk, was running. It refused every incoming MySQL request.


I reconfigured it via Plesk, allowing it to let MySQL requests to go through. I don't know if I could also have done it in the shell, but deactivating it definitely helped! Yet I think that might be kind of dangerous.


[#33703] Tuesday, November 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rofity

Total Points: 182
Total Questions: 98
Total Answers: 115

Location: Albania
Member since Sat, Jan 7, 2023
1 Year ago
;