Create db for app

Hello everyone, I simply wanted to know how to create a db on mysql (I downloaded mariadb). Needless to say, I was doing early on ns7 … but I would like to know how to do it from the shell. Thank you

You can use following command to start mysql in the container, change mariadb1 to the name of your mariadb instance.

runagent -m mariadb1 podman exec -ti mariadb-app mysql

2 Likes

Hi Mark, I’m sorry but how do I see the instance? I executed the commands either in ssh or as you wrote . He asks me that he can’t find Id, unfortunately I didn’t understand the ID reference.

How did you install mariadb? Using NS8 mariadb app (don’t recall if it’s from nethforge) or otherwise?

1 Like

Hi, yes what the repo software proposed to me.

So the mariadb app instance name in your case is mariadb1 (the name under the logo)

Some ideas:

Are you on the right node?

Are you root on your NS8 node?

Did you already configure the app?

Is the following working (just entering the app environment) ?

runagent -m mariadb1

[root@ns8 ~]# runagent -m mariadb1
runagent: [INFO] starting bash -l
runagent: [INFO] working directory: /home/mariadb1/.config/state
[mariadb1@ns8 state]$

The following should work now:

podman exec -ti mariadb-app mysql

[mariadb1@ns8 state]$ podman exec -ti mariadb-app mysql
Error: no container with name or ID “mariadb-app” found: no such container
[mariadb1@ns8 state]$

I think you didn’t configure the mariadb app:

https://docs.nethserver.org/projects/ns8/en/latest/mariadb.html#configuration

Just do the configuration in the web UI:

Without configuration, no container is started so you can’t enter the mariadb-app container.

4 Likes

Thanks, I didn’t notice that you needed to give the path. Now works . !
Great Mark!

1 Like