Issue eporting database

Hello there,

I’m trying to copy my wordpress site… so I transfered all files and when it came to the database, I exported the database but it didn’t export everything only exported 30MB out of around 600MB

It is a limitation on your PHP settings. Go to https://SERVER_URL:8090/managephp/editPHPConfigs and increase the memory limit, max_execution_time (the total time the script runs, including database queries, regardless whether it’s running in loops or not), post_max_size (limit of the entire body of the request, which could include multiple files)

Sorry I forgot to mention this earlier but I already increase all, Memory_limit, Max_execution_time, upload_file_size, post_max_size and the max_input_size…
All these are increased to around 1000 and the issue is still there…
when downloading the file it start downloading and it only looks as completed but when checking the file it’s just 30MB and when trying to import it it gives so many different errors because the file is not complete

  1. Confirm the php you are using in SSH terminal /bin/php -v and post it here

  2. Are you using https://SERVER_URL:8090/dataBases/phpMyAdmin or some other panel?

the php I’m using is PHP 7.4.3 (cli)
and this is the link I use from cyberpanel http://SERVER_URL:8090/dataBases/phpMyAdmin then it login to the database

Btw, when I click on (Server: localhost) at the top in phpmyadmin

I see this message warning " The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. [Find out why]
Or alternately go to ‘Operations’ tab of any database to set it up there."

and an error saying “The $cfg[‘TempDir’] (/usr/local/CyberCP/public/phpmyadmin/tmp) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.”

is this an issue for it to not download the whole database?

Try exporting using mysqladmin console:

mysqldump mydb -u  root -p | gzip > database_name.sql.gz

Can you explain on how to export the database using this way
I tried to use the server terminal and whenever I write this command it asks me for the password and it deny access for my root user

I also tried to replace root with the database username and didn’t work too

Use the default root password that cyberpanel set up. You can find it inside the following file:

I’m getting a new error

mysqldump: Got error: 1049: “Unknown database ‘mydb’” when selecting the database

and my database isn’t called mydb so not sure why it’s looing for mydb

The command joseph sent you, was a template. You can’t copy and use it like that.

On his command, replace “mydb” with the database name you want to export.
If your database is called DATABASE123, the command would be the following:

mysqldump DATABASE123 -u root -p | gzip > database_name.sql.gz

That will execute dump the database DATABASE123 and pipe it to gzip for compression.

For future reference if you want to explore it yourself, the syntax is:
mysqldump [DATABASE] -u [USER] -p [PASSWORD] > [FILENAME]
You replace the fields inside [ ] with things specific to your environment.

For example if you want to export cyberpanel database:
mysql cyberpanel -u root -p > cyberpanel.sql
Password can be added in the above command, usefull when scripting. Imagine your password was “PW!123!”, the command would like like this (yes, no space after the -p argument):
mysql cyberpanel -u root -pPW!123! > cyberpanel.sql

I think it worked but how do I find the dumped database or download it?

and is there a way to fix the export in phpmyadmin
because it worked with me once before and I don’t know why it’s not working now

It’s in the same directory where you ran the command from.
If you forgot what directory you’re in, use this command:
If you ran the command from joseph, you should now have a file tar.gz.

You can download it to your pc and extract it (with 7-zip for example
Inside you will have the .sql file