How to import the database? And it seems to be limited to 500MB?

zhouqing

New member
Joined
Dec 15, 2022
Messages
11
如何导入数据库?而且好像限制在500MB?
 

Attachments

  • QQ截图20221216064232.png
    QQ截图20221216064232.png
    6.4 KB · Views: 206
Please only English, not Chinese.

As for the error. It's the max filesize limit.
Either raise the upload_max_filesize setting in the php.ini of the server, or restore the database via SSH command.
 
Still not, my database 2G
Please only English, not Chinese.

As for the error. It's the max filesize limit.
Either raise the upload_max_filesize setting in the php.ini of the server, or restore the database via SSH command.
 
If your database is too big, I've got the impression that you probably have a Wordpress site or forum and have saved all files and attachments to the database instead of the filebase. That will cause such a big database.
Or for some other reason.

However, even with a 2 G database, it's possible to restore the database via SSH, because as root via SSH there is no limit.
Except maybe resources going wild on small VPS or something.

Try like this. Login as root via SSH or login via SSH and su to root.
Then issue this command:
mysql -uUSERNAME -p DATABASENAME < /path/to/the/backup.sql

Ofcouse replace what needs to be replaced. After pressing enter, you have to give in the password for the databaseuser.

Or you can also put that directly behind the -p too if you want, in that case it looks like this:
mysql -uUSERNAME -pdatabasepasswordhere DATABASENAME < /path/to/the/backup.sql
 
If your database is too big, I've got the impression that you probably have a Wordpress site or forum and have saved all files and attachments to the database instead of the filebase. That will cause such a big database.
Or for some other reason.

However, even with a 2 G database, it's possible to restore the database via SSH, because as root via SSH there is no limit.
Except maybe resources going wild on small VPS or something.

Try like this. Login as root via SSH or login via SSH and su to root.
Then issue this command:
mysql -uUSERNAME -p DATABASENAME < /path/to/the/backup.sql

Ofcouse replace what needs to be replaced. After pressing enter, you have to give in the password for the databaseuser.

Or you can also put that directly behind the -p too if you want, in that case it looks like this:
mysql -uUSERNAME -pdatabasepasswordhere DATABASENAME < /path/to/the/backup.sql
This is too complicated. Is there a simple way to relieve restrictions?
 
This is too complicated.
Are you a admin??? Nothing complicated about it, this is something which you can copy and paste, I can let my daughter even do this.

Simple way... as said, raise the php.ini restrictions. Probably you need to also change the time limit and post_max_size maybe.
Check here, somebody with the same issue, his DB was 1,6 G and also fixed it.

Be aware to restart php after making the change, or apache if you're running mod_php instead of php-fpm.
 
Are you a admin??? Nothing complicated about it, this is something which you can copy and paste, I can let my daughter even do this.

Simple way... as said, raise the php.ini restrictions. Probably you need to also change the time limit and post_max_size maybe.
Check here, somebody with the same issue, his DB was 1,6 G and also fixed it.

Be aware to restart php after making the change, or apache if you're running mod_php instead of php-fpm.
Look at the new post I just posted, I don't want PHP81 version
 
Doesn't matter, php 7.2 also has a php.ini with limits. It has nothing to do with the php version.

I answered your new post already too.
But now I'm going to sleep. You should be able to fix it. Goodnight.
 
Back
Top