New to Alma cant seem to autmate maria db tasks

I am trying to write a little script for installing certain software’s I use for the most part the bash works fine. However this is where i run into a snag. The one i have for ubuntu I was able to get it to install maria db configure the user and put the password in a text file in my root folder. Then load a premade sql file from the same folder. I have so far not been able to replicate this behavior… End result maria installed user created password in text file in root folder and database already imported.

If anyone can help me with the syntax or setup to do this in a script it would be much appreciated. I install a specific software a lot and it saves me a ton of time.

fixed ill post a tutorial later

I do still have a small issue normally on ubuntu id cd / into a directory to run my program but the path doesnt translate the same I have a program looking in /home for files it doesnt find them even though i can cd / and see them.

Interesting.
I run the normal install and use a expect file to configure and secure the installation.
Would be nice to know if this step can be avoided / replaced by a simple text file used during initial installation.

Or are you referring to a .cnf file which coud contain client username an password?