I need a "root" canal apparently. root keeps asking for password

Themus's profile image Themus posted 2 years ago in General Permalink

Just started using HeidiSQL and it worked great connecting to my new MariaDB10 database.

I think it can also be used to connect to MariaDB10 via SSH and edit my.cnf. Qnap states that file is located below:

We use a custom implementation of MariaDB10, you just need to define the socket in the connection command. The correct way to connect to the Qnap version of MariaDB is as follows:

/share/"Data Mount Point"/.qpkg/MariaDB10/bin/mysql -S /var/run/mariadb10.sock -u root -p

I have HeidiSQL setup with the Settings as:

  1. Network type: MariaDB or MySQL (SSH Tunnel)
  2. Library: libmariadb.dll.
  3. Hostname /IP: IP address of the Qnap NAS
  4. Username and password supplied already successfully connects via HeidiSQL through TCP/IP
  5. Port 3307

SSH Tunnel Settings

  1. SSH executable: plink.exe
  2. SSH host + port: IP address of Qnap NAS port 22
  3. Username and Password supplied is root with password verified in phyMyadmin successful logins.
  4. SSh timeout 4
  5. Private key file: none supplied
  6. Local prt 3307

Everytime I click on open I receive a pop-up box root@192.168.20.50's password.

I put in the same password I KNOW works in phyMyadmin and it asks for the password again.

I comes back with Connection failed Access Denied.

I really like HeidiSQL interface. I reckon I could work through Putty, but I thought I would ask for help before I gave up.

Thank you in advance.

ansgar's profile image ansgar posted 2 years ago Permalink

Username and password which matches to those in phyMadmin must be entered in the Settings tab, not in the SSH tunnel tab. The SSH tunnel user/password needs a shell user, like in putty.

Themus's profile image Themus posted 2 years ago Permalink

Thank you. I am getting something very similar to what you recommended as a solution. But to no avail.

The following error, or a similar one, is mostly caused by a tunnel onto the official IP address of your remote server:

Lost connection to MySQL server at 'reading initial communication packet', system error: 0 "Internal error/check (Not system error)" In such cases, ensure you're using "127.0.0.1" in Settings > Hostname/IP, and the remote IP of your server in SSH tunnel > Host.

Attached are two screen captures. The settings username works to login into the MariaDB10 and show up in phpMyadmin with full access. The SSH tunnel username logins in successfully with Putty.

Should I try creating another account?

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

Settings look good, similar to what I use myself here on a remote server.

You should

  • update to v12.0 if not done already
  • try ssh.exe in the "SSH executable". v12.0 has support for the Windows internal OpenSSH client. Not sure but that may make a difference for your connection.
Themus's profile image Themus posted 2 years ago Permalink

I tried SSH.exe and I get a different Connection Failed.

SSH exit unexpected. Command line was: ssh.exe Ted@192.168.xx.xxx -pw "**" -p 22 -N -L 3307:127.0.01:3306

I verified with the user Ted I can SSH with Putty into the NAS interface and then path out to the MariaDB location and use the ted user account to login directly into the database interface.

With plink.exe my error message somewhat different from what I had earlier.

Connection failed Lost connection to server at 'handshake: reading initial communication packet', system error 0

No firewall is enabled so not sure what the issue could be. As I shared earlier, the TCP/IP network type works fine.

Themus's profile image Themus posted 2 years ago Permalink

For the fun of it, I checked Prompt for Credentials under Settings where hostname /IP is 127.0.0.1.

It prompts me to login into 127.0.0.1. That is the loopback address and not sure why that should be the case.

But I don't get any different results if I put my NAS IP in that field instead.

I will add, I did edit the my.cnf file with skip-bind-address if that makes any difference.

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