Re: [Dorset] Logging into the WMT Database

2023-07-09 Thread Terry Coles

On 09/07/2023 16:37, Hamish McIntyre-Bhatty via dorset wrote:
Hmm, I'm pretty sure PhpMyAdmin has a users section where they should 
all show up. They're obviously working even if they aren't showing up, 
otherwise the system wouldn't be running and responding to changes in 
the environment.
I guess I was looking in the wrong place.  I've just found a list of 
records that include admin and all the devices in the River System, 
presumably I would need to add the GUI to that list?  If so, what are 
the credentials in the config file for?


--
Terry Coles


--
 Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Logging into the WMT Database

2023-07-09 Thread Hamish McIntyre-Bhatty via dorset

On 08/07/2023 08:33, Terry Coles wrote:

On 07/07/2023 19:25, Hamish McIntyre-Bhatty via dorset wrote:

Hamish,
Yes, there are compatibility issues with newer versions of 
mysql/mariadb clients and the old version of mysql the server uses, 
which is why the installation spec says to use an older version of 
python-mysqlclient, amongst other things.
Yes.   I was aware of that, but was distracted by being unable to log 
in via SSH, let alone the MySQL Client.
I'm surprised the users I created aren't showing up there, but I 
can't take a look for myself as the VPN isn't working at my end.

Can you suggest where I should look?


Hmm, I'm pretty sure PhpMyAdmin has a users section where they should 
all show up. They're obviously working even if they aren't showing up, 
otherwise the system wouldn't be running and responding to changes in 
the environment.


Hamish



--
 Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Logging into the WMT Database

2023-07-08 Thread Terry Coles

On 07/07/2023 19:25, Hamish McIntyre-Bhatty via dorset wrote:

Hamish,

Yes, there are compatibility issues with newer versions of mysql/mariadb 
clients and the old version of mysql the server uses, which is why the 
installation spec says to use an older version of python-mysqlclient, amongst 
other things.
Yes.   I was aware of that, but was distracted by being unable to log in 
via SSH, let alone the MySQL Client.

I'm surprised the users I created aren't showing up there, but I can't take a 
look for myself as the VPN isn't working at my end.

Can you suggest where I should look?

--
Terry Coles


--
 Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Logging into the WMT Database

2023-07-07 Thread Hamish McIntyre-Bhatty via dorset
Hi Terry,

Yes, there are compatibility issues with newer versions of mysql/mariadb 
clients and the old version of mysql the server uses, which is why the 
installation spec says to use an older version of python-mysqlclient, amongst 
other things.

I'm surprised the users I created aren't showing up there, but I can't take a 
look for myself as the VPN isn't working at my end.

Hamish

On 6 July 2023 13:53:25 BST, Terry Coles  wrote:
>On 06/07/2023 12:45, Ralph Corderoy wrote:
>> This means the TCP port on the NAS's network interface has nothing
>> listening to it to accept your incoming connection request.  This may be
>> because the MySQL server isn't configured to listen on the network
>> interface, or it is listening on that interface but on another
>> non-standard TCP port.
>> 
>> Does any existing software talk to the MySQL server on that machine from
>> outside of that machine?
>All of the Pis talk to the MySQL server through Hamish's framework.
>> ...
>>> ERROR 1043 (08S01): Bad handshake
>> Is that using the mysql(1) program from a shell?  Or some other MySQL
>> client?
>
>The MySQL client that I installed from Kubuntu's repository:
>
>terry@OptiPlex:~/Useful$ mysql -V
>mysql  Ver 8.0.33-0ubuntu0.23.04.2 for Linux on x86_64 ((Ubuntu))
>
>It is much newer than the server (
>
>>> I can log in to the D-Link and thence to the PHPMyAdmin App with these
>>> credentials through a browser.
>>  From there you can probably examine the configured users and perhaps the
>> server's configuration.
>
>That's what I thought, but all I can see is that SSH is enabled for the D-Link 
>itself, but only for admin.  For the MySQL Server, I can only see a list of 
>users under the "Privileges" tab.  There appears to be only four; admin, 
>backupuser, pma and root. Additionally, there is a record for user and another 
>for password, but both appear to be empty.
>
>I can see no evidence of the credentials set up by Hamish for access from the 
>Pis and from the engineering GUI running on the NAS Box.
>
>-- 
>Terry Coles
>
>
>-- 
> Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
> Check to whom you are replying
> Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
> New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk
-- 
  Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Logging into the WMT Database

2023-07-06 Thread Terry Coles

On 06/07/2023 12:45, Ralph Corderoy wrote:

This means the TCP port on the NAS's network interface has nothing
listening to it to accept your incoming connection request.  This may be
because the MySQL server isn't configured to listen on the network
interface, or it is listening on that interface but on another
non-standard TCP port.

Does any existing software talk to the MySQL server on that machine from
outside of that machine?

All of the Pis talk to the MySQL server through Hamish's framework.

...

ERROR 1043 (08S01): Bad handshake

Is that using the mysql(1) program from a shell?  Or some other MySQL
client?


The MySQL client that I installed from Kubuntu's repository:

terry@OptiPlex:~/Useful$ mysql -V
mysql  Ver 8.0.33-0ubuntu0.23.04.2 for Linux on x86_64 ((Ubuntu))

It is much newer than the server (


I can log in to the D-Link and thence to the PHPMyAdmin App with these
credentials through a browser.

 From there you can probably examine the configured users and perhaps the
server's configuration.


That's what I thought, but all I can see is that SSH is enabled for the 
D-Link itself, but only for admin.  For the MySQL Server, I can only see 
a list of users under the "Privileges" tab.  There appears to be only 
four; admin, backupuser, pma and root. Additionally, there is a record 
for user and another for password, but both appear to be empty.


I can see no evidence of the credentials set up by Hamish for access 
from the Pis and from the engineering GUI running on the NAS Box.


--
Terry Coles


--
 Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Logging into the WMT Database

2023-07-06 Thread Ralph Corderoy
Hi Terry,

> Using code copied from the existing framework, I was getting the
> following when the sockets handler was starting:
>
>      Connection Refused (NAS): [Errno 111]

This means the TCP port on the NAS's network interface has nothing
listening to it to accept your incoming connection request.  This may be
because the MySQL server isn't configured to listen on the network
interface, or it is listening on that interface but on another
non-standard TCP port.

Does any existing software talk to the MySQL server on that machine from
outside of that machine?

> access the database independently using the MySQL client from a
> console.
...
> ERROR 1043 (08S01): Bad handshake

Is that using the mysql(1) program from a shell?  Or some other MySQL
client?

> I can log in to the D-Link and thence to the PHPMyAdmin App with these
> credentials through a browser.

From there you can probably examine the configured users and perhaps the
server's configuration.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Logging into the WMT Database

2023-07-06 Thread Terry Coles

Hi,

Those who attended the online meeting on Tuesday will recall my question 
about accessing the MySQL database at Wimborne Model Town.


To briefly recap, I have been developing a browser based GUI using Flask 
and (as far as possible) Hamish's Software Framework which manages all 
the devices within the River System at the site.  These include; 
Raspberry Pis monitoring water level sensors, Raspberry Pi based Gate 
Valves, plus pumps and solenoid valves which are managed from adjacent 
sensor Pis.  Unfortunately, Hamish is out of touch at the moment.


The status of all these devices is written to a MySQL Server running on 
a recycled D-Link ShareCenter.  Using code copied from the existing 
framework, I was getting the following when the sockets handler was 
starting:


    Connection Refused (NAS): [Errno 111]

The suggestion from the Meeting was that this was a sockets error and I 
should try to access the database independently using the MySQL client 
from a console.  If this worked, then I should be able to use Python's 
own database tools under Flask to access the data I wanted.


I tried this, but believe I will have to install a much earlier version 
of MySQL on PC because the server rejects my queries with:


ERROR 1043 (08S01): Bad handshake

I then tried to ssh into the device using the passwords that I have for 
admin on both the D-Link and the MySQL server.  Neither worked 
(permission denied), but I can log in to the D-Link and thence to the 
PHPMyAdmin App with these credentials through a browser.


I have several passwords for the server; one used in the Software 
Framework; one for the Browser interface for PHPMyAdmin and one used by 
Hamish within an earlier GUI which runs on the D-Link.


Any thoughts on what I'm missing?

--
Terry Coles


--
 Next meeting: Online, Jitsi, Tuesday, 2023-08-01 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk