0

I have installed a MariaDB 10.3.17 server on a Raspberry Pi 4B running Raspbian Buster. Lately some my applications that I've built (in this case in LabVIEW) are not able to open connections. I have utilized the same LabVIEW application to do this successfully for some time now, so I am beginning to wonder if there's anything that may have changed on the RPi+Maria server.

I threw together a very quick database test application in LabVIEW that utilizes a few simple MySQL API functions (Open a connection, use database, insert a row.) but it keeps getting rejected (within LabVIEW, error 8045 is thrown:

" Access denied for user 'aeiuser'@'192.168.6.99" (using password: YES) in MySQLVIEW.lvlib:MySqlConnector.lvclass")

So since it seems the server side is rejecting it, running sudo systemctl status mariadb provides the following in the log:

> Active: active (running) since Sun 2020-01-26 20:53:10 CST; 3min 16s ago  
> Docs: man:mysqld(8)  
> https://mariadb.com/kb/en/library/systemd/  
> Process: 5369 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)  
> Process: 5370 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)  
> Process: 5372 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment  
> Process: 5412 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)  
> Process: 5415 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)  
> Main PID: 5381 (mysqld)  
> Status: "Taking your SQL requests now..."  
    >> Tasks: 32 (limit: 4915)  
    >> Memory: 47.8M  
   >> CGroup: /system.slice/mariadb.service  
           └─5381 /usr/sbin/mysqld

> Jan 26 20:53:11 raspberrypi /etc/mysql/debian-start[5468]: | 4  | system user |           |    | Daemon  |      | InnoDB purge worker      |                  | 0.  
Jan 26 20:53:11 raspberrypi /etc/mysql/debian-start[5468]: | 5  | system user |           |    | Daemon  |      | InnoDB shutdown handler  |                  | 0.
Jan 26 20:53:11 raspberrypi /etc/mysql/debian-start[5468]: | 36 | root        | localhost |    | Query   | 0    | Init                     | show processlist | 0.  
Jan 26 20:53:11 raspberrypi /etc/mysql/debian-start[5468]: +----+-------------+-----------+----+---------+------+--------------------------+------------------+---  
Jan 26 20:53:11 raspberrypi /etc/mysql/debian-start[5468]: Uptime: 1  Threads: 7  Questions: 59  Slow queries: 0  Opens: 32  Flush tables: 1  Open tables: 26  Que  
Jan 26 20:53:18 raspberrypi mysqld[5381]: 2020-01-26 20:53:18 37 [Warning] IP address '192.168.6.99' could not be resolved: Name or service not known  
Jan 26 20:53:18 raspberrypi mysqld[5381]: 2020-01-26 20:53:18 37 [Warning] Access denied for user 'aeiuser'@'192.168.6.99' (using password: YES)

Note the last two lines. I cannot seem to find anything more specific as this. I have read about such things like skip-name-resolve being utilized in /etc/my.cnf, but I have had no luck with this.

Is there somewhere within the service where I can find a bit more granular information on what's happening? Any ideas?

Thanks

Big Owls
  • 37
  • 6
  • Can you connect to the db from mysql client wirh the same parameter ? – Bernd Buffen Jan 27 '20 at 05:35
  • Does [MySQL: 'user'@'hostname' vs 'user'@'IPaddress'](https://dba.stackexchange.com/q/101265/117531) apply here? (E.g. do you (only) have `@hostname` in your user table?) – Solarflare Jan 27 '20 at 11:22
  • `192.168.6.99` is a [private network address](https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses), so asking a DNS server for the host's name fails. Perhaps MariaDB needs to be told it's [running on localhost](https://mariadb.com/kb/en/connecting-to-mariadb/). – Joe Friedrichsen Jan 27 '20 at 15:31
  • My configuration/setup was poorly executed. I needed to add the following attributes to the 'aeiuser' account to get it to work: mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'aeiuser'@'%';"; mysql -e "UPDATE mysql.user SET Password = PASSWORD('aeipassword'), plugin='' WHERE user = 'aeiuser';"; mysql -e "FLUSH PRIVILEGES;"; – Big Owls Jan 29 '20 at 20:24
  • That error message says that the user had the wrong password. – Rick James Feb 02 '20 at 01:39

0 Answers0