How do I migrate the database?

I have created a database in phpmyadmin. It works, but it is not visible in the panel. And it doesn’t get into the backup. How do I make it visible in the panel?

You need to create databases in hestia, if you do it in phpmyadmin, hestia cant know anything about it.

1 Like

So, I need to export a data from phpmyadmin. Then create a DB in the panel. And import the data. Right?
Can I make it easier? I have several big DB there.

No … You can’t

I would not do it over pma for big files, better use mysqldump/mysql.

Hi,

This is very easy to do.

Manually added in the db.conf under the user data file, which you see in /usr/local/hestia/data. You need to copy the format information of the existing database in the db.conf, which should be same, as it is for other databases. Simply change the details in there. Then, the database will appear in the panel.

The only thing you need to make sure, while creating a new database manually in phpadmin, or working on the existing database in there, is the user prefix. Hestia can connect with this user_prefix as “username_”. This would be:

username_databasename

In that case, it will have the same effect as to adding a new database through the php panel, as suggested above.

1 Like

Also make to be sure to include the hashed password and so on. It is probally easier to the backup and then create a new database and then import it

1 Like

Hi,

Just to share my experience iin this matter.
1.
The name of the database with the username_ existed in the MariaDB server and had the hased password created by phpmyadmin.

I had created a new record in the db.conf. Here, the hased password does not matter. This new entry will simply create a link in the Hestia admin.

  1. Change the password in Hestia admin. The php scripts of Hestia will check the validity of the password, if it is strong. This is imporant because I did not use a Capital in the password while creating in phpmyadmin.

After changing the password in Hestia admin, one can connect to the database and it becomes part of the user account. All functions are now available, like move, change owner, change password, delete it, etc.

Every time you rebuild the database it will change the database that is known in the db.conf. Unless you change the password in HesitaCP after importing otherwise it will reset during each rebuild

2 Likes