How to connect to MariaDB on Synology Server from Visual Studio

Chechy Levas picture Chechy Levas · Jun 9, 2017 · Viewed 24.5k times · Source

I want to build an application that uses a database. I have a Synology server and I want to use it as a database server. I want to build the application in .Net using Visual Studio. I have installed MariaDB and phpMyAdmin. There is already a database called 'test'. I have created a user called 'Chechy' and have set it up to be able to connect from any host. I am unable to log in to phpMyAdmin using 'Chechy', not sure if I am supposed to be able to, but I get error #1045. Logging in with 'root; works fine.

What am I supposed to enter in this screen to make it work. I have tried the server name (with and without the double backslash), and I have tried the internal ip address of the server. Needless to say, nothing has worked so far.

Add connection

Answer

Mattnick picture Mattnick · Jul 11, 2018

Enter Synology by ssh.

  • Search mysql (/usr/local/mariadb10/bin/mysql)
  • Enter to mariadb with command line:
./mysql -u root -p 
  • Check user's:
SELECT User, Host FROM mysql.user WHERE Host <> 'localhost';
  • Granting User Connections From Remote Hosts:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'**192.168.1**.%' IDENTIFIED BY '**my-new-password**' WITH GRANT OPTION;