Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

MariaDB version 10 & NAS

BigBaz's profile image BigBaz posted 3 years ago in Creating a connection Permalink

Hi I have a NAS (Synology DS412) which has many applications which can be installed and used - one being MariaDB 10.

HeidiSQL says it can connect with MariaDB 10 but I can't get it to do this (see attached). Looking at the help link, the error seems to indicate that MariaDB will only accept an IP of 127.0.0.1 whereas my NAS is on the 192.168.0.xx IP range which home networks often use.

There are steps to take to resolve this but it means accessing some configuration files, which I've no idea how I can do that on my NAS (I've asked Synology about this).

Any thoughts as to how I can resolve this connectivity issue would be appreciated.

1 attachment(s):
  • MariaDBNASIssue
ansgar's profile image ansgar posted 3 years ago Permalink

You need to connect to the MariaDB instance once and change that root account, to make it allow IPs other than 127.0.0.1. I suppose Synology also provides some client for MariaDB, maybe a web based client?

BigBaz's profile image BigBaz posted 3 years ago Permalink

Yes, it provides phpMyAdmin (on the NAS) which works fine. It's just that I need to get into the NAS to use phpMyAdmin and I'd prefer using HeidiSQL as I also connect to several other MSSQL database elsewhere.

The Synology help people are suggesting the issue is with HeidiSQL method of connecting, which is very unhelpful as it's clear to me MariaDB is the problem, restricting access to 127.0.0.1 IP initially. And they haven't givem me a clue as to access the MariaDB configuration files.

ansgar's profile image ansgar posted 3 years ago Permalink

Ok, in phpMyAdmin, you should be able to run a custom query, so you could create a new user like this:

CREATE USER 'root'@'192.168.%' IDENTIFIED BY 'yOurPassW0rd';
GRANT EVENT, DROP, DELETE, CREATE VIEW, CREATE TEMPORARY TABLES, CREATE TABLESPACE,
  CREATE ROUTINE, CREATE, ALTER ROUTINE, ALTER, SHOW VIEW, SHOW DATABASES, SELECT,
  PROCESS, EXECUTE  ON *.* TO 'root'@'192.168.%';
FLUSH PRIVILEGES;
BigBaz's profile image BigBaz posted 3 years ago Permalink

Hi Thanks for this I'll give this a go. However, Synology came back with something similar, creating a new User from phpMyAdmin using the UI, which seemed to go OK. So I now have a new User with Host set as 192.168.0.12 (see attached screenshot). However, when, in HeidiSQL, I press Open I get the error message shown - which is saying Host 192.168.0.28 is not allowed....! Where does it get .28 from when the IP named is .12? Very Odd - HeidiSQL seems to have an incorrect IP address it picks up. I've closed down and opened it again several times and no change.

1 attachment(s):
  • NASMariaDBIssue
ansgar's profile image ansgar posted 3 years ago Permalink

Where does it get .28 from when the IP named is .12

The .28 is yours, from the client side. The .12 is on the server side.

So I now have a new User with Host set as 192.168.0.12

This is wrong, you have to set the account's ip to 192.168.0.28, or to wildcard 192.168.%.

BigBaz's profile image BigBaz posted 3 years ago Permalink

Worked a treat!

Many thanks for your help, great support!

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.