Copy grafana database, rename it abd start new grafana on it

Hello guys,
I hope you’re doing well.
Here is my question.

I have a working prod grafana On mysql database, let’s call it grafana1.
I want to copy this database on the same mysql server, change name into grafana2 and start new grafana on it.

Sqldump root -p grafana1 > grafana1.sql
CREATE DATABASE grafana2
Mysql -u root -p grafana2 < grafana.sql
Systemctl start grafana « the new one »

DOESN’t work

I also tried, to start the new grafana before to dump the grafana.sql but sale problème.

I also tried with Maria backup and same.

Is it possible to do that ?

Have a great day

This is not a Grafana question - it’s a MySQL question.

Edit the dump file you created and edit the name of the database it’s trying to
write into at the top.

Alternatively look at the man page for mysqldump and only dump the table you
need, then read it into the new database name.

Regards,

Antony.