mariaDB import dump

Hi there, I fresh install Hestia on Vult / debian9 to try to manage 3 or 4 wordpress sites. I’m not an linux expert but my knowledge grows up every day (I hope).

I have one wordpress (MU) to transfert from my ex-hoster to Vultr for tests. I create from Hestia a fresh User > a fresh database. But my dump from my ex-hoster, is almoste 70 Mo, too large for phpmyadmin, so I try to achieve an import in command line Terminal. Bur when I try ti show databases :

MariaDB [xxxxx_admin_72072]> show databases
->

I see my database in phpmyadmin, I’ve just erased all tables to prepare my dump import.

Did I forget something ? Is databases are stored elsewhere from classic Debian9 ?

I’m looking for the right method to import my sql dump.

Thanks a lot for your help anyway :slight_smile:

mysql -u username -p database_name < file.sql

And please create a user account for your website this will be safer :slight_smile:

Thanks @eris, Yes I did it. I have my first account > admin and the second one “my_website_name” wordpress deployed in it (testing the one click-install) with his own database.

But maybe something important, I’ve put my dump.sql in the

/home/UserAccount/web/WebDirectory/public_html/mydump.sql

Is it ok if I wright the entire path ? Or it is better if I move the dump.sql in another place ?

Thanks a lot.

just don’t. this essentially is the worst place you can pick to put files like that.

everything you put into public_html will be available to the public internet under your domain name. that’s why it is called public_html

databases (and their dumps) are to be protected because they most likely contain user data and hashed passwords and all that sort of stuff. please put it somewhere safe and far away from being publicly accessible.

1 Like

Aouch !! --° You you’re right @falzo, I"m on my way… :unamused:

just did it… :no_mouth:

Solved ! thanks.

You might take a look at using wp-cli. Its pretty handy for a lot of Wordpress tasks, but dumping and restoring databases (and doing a search and replace on them) is especially useful. It will pick up your DB settings from wp-config.php. And because its CLI, there’s no problem with big databases.