Last update at :2023-12-27,Edit by888u
Partners who use Linux system vps hosts know very well that it is very convenient and fast for phpmyadmin to import a small database file. If the database file is too large, even if you modify the relevant parameters, the database import will often fail or time out. For example, for database files exceeding 100M, generally speaking, phpmyadmin will not be of use. You need to use the source command line of mysql in ssh to import. The operation is as follows:
1. Enter the SSH client and enter mysql -uxxxx -pZZZZ
Note: xxxx represents your myql administrator username, usually root, ZZZZ refers to the password of this username, enter it and press Enter, it will display:
mysql>
2. Enter the use database name (if it does not exist, create one first)
3. Enter set names ‘utf8’; (usually it depends on the file format being imported)
4. Enter source /xxx/xxx/aaa.sql;
Note: /xxx/xxx/aaa.sql is the path where the sql backup file is located. After entering it, just wait for the system's import operation. If there is an error, you will be prompted.
This method is suitable for importing mysql databases larger than about 100M, which is fast and convenient.
Recommended site search: How long does it take for website registration, website registration information query, free cloud server, free domain name registration, Hong Kong cloud host, icp registration center, registration query, Ministry of Industry and Information Technology website registration system, shopex space, domain name registration Number query,
发表评论