Re: From bash script (Debian Bookworm) login and query to MariaDB

^Bart <[email protected]> Thu, 2 Nov 2023 10:09:18 +0100
Newsgroups comp.databases.mysql
Organization A noiseless patient Spider
Message-ID <[email protected]>
> The main issue with that script is the base64 encoded password, from 
> security standard point of view that is still as if the password was 
> stored in plain text.

I didn't think about this issue... :\

> sure if you need to automate this like running cron job, then you will 
> need to provide a password, then see to that the file is just readable 
> by the user it's executed as and that user ain't someone that people 
> just can login in with, don't forget that by default root will be able 
> to read the file.

Yes, this is what I need a cron job to automate the process.

> You may also consider to create a store procedure that does everything 
> you need,
> 
> https://mariadb.com/kb/en/create-procedure/
> https://mariadb.com/kb/en/stored-routine-privileges/
> https://mariadb.com/kb/en/call/

[CUT]

I didn't know it and this is a good idea to start to study something new 
to improve "my skills" (and obviously to improve the security field!); 
I'm working on a test machine in our lan (not in DMZ) so just me and one 
colleague can login there, now I need to solve this "problem" because 
another colleague is waiting me with Knime to do queries from MariaDB 
and I'll use the dirty way! :)

Really thanks also to you for this great reply! :)

Have a nice day!
^Bart