wp db import : file missing or not readable
-
I don’t know your use case, but please try to follow these steps, from Cloudron instance command line.
Note that the old DB will be totally deleted.
Before, upload mysqldump.sql to TMP folder
Then, open MySQL command line and type:
STATUS; //to know database name DROP DATABASE cfda74f223139c8; //delete old DB CREATE DATABASE cfda74f223139c8; //create a new DB USE cfda74f223139c8; //use new created DB SOURCE mysqldump.sql; //import DBcfda74f223139c8 is only for demo purpose, instead, you’ve to put your DB Name that comes from STATUS command.
Check if DB is imported:
show tables;Let us know if everything works good.
-
Hello @p44
This is one way.
It is also documented https://docs.cloudron.io/guides/import-mysqlBut I know that @sebastienserre knows about this documentation from his latest @dolibarr migration.
So I guess his question is specific to the wp-cli. -
Hello @p44
This is one way.
It is also documented https://docs.cloudron.io/guides/import-mysqlBut I know that @sebastienserre knows about this documentation from his latest @dolibarr migration.
So I guess his question is specific to the wp-cli.@james Method I suggested is "half way" between wp-cli and Cloudron.

«All roads lead to Rome»
Let’s see if works also for @sebastienserre scenario
-
Yes, my question was, why this specific import method from WPCLi (which is easier than a SQL query) doesn't work.
I do not know if I'm doing something wrong or if it's a limitation of the WordPress developer Cloudron app.but thank you for your tip @p44
-
@p44 tip works but it's really easier to launch a
wp db import backup.sqlcommand. -
@sebastienserre Thanks for your feedback: I’m glad that method works.
About your original question, did you try to upload file in TMP folder and then, from command line, point to that file?
-
@sebastienserre Thanks for your feedback: I’m glad that method works.
About your original question, did you try to upload file in TMP folder and then, from command line, point to that file?
@p44 said in wp db import : file missing or not readable:
did you try to upload file in TMP folder and then, from command line, point to that file?
or just the full path as suggested by @james ?
-
oh! I'm sorry, i missed @james answer.
wp dbcommand works with the full path -
J james marked this topic as a question
-
J james has marked this topic as solved
-
