网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   MySQL (https://www.0058.net/forumdisplay.php?f=76)
-   -   How to import a big database when phpmyadmin can't? (https://www.0058.net/showthread.php?t=4524)

topvip 2013-04-01 10:09 PM

How to import a big database when phpmyadmin can't?
 
if you have SSH access then you can use the following commands to backup / restore databases
Quote:


mysql -u[Username] -p[Password] [Database Name] < filename.sql - Dump a SQL file into a MySQL database. Note the "<".
Replace "[Username]" with the database username (generally controlpaneluser_databaseuser). Replace "[Password]" with the database password and replace "[Database Name]" with the database name. Finally change "filename.sql" to the correct filename/location.
eq.. to be done from the folder where you want the file to be saved
Quote:

mysql -umyusername -pmypassword mydatabasename < myfilename.sql
Quote:

mysql -u[Username] -p[Password] [Database Name] > filename.sql - Dump a MySQL database to a SQL file. Note the ">".
Replace "[Username]" with the database username (generally controlpaneluser_databaseuser). Replace "[Password]" with the database password and replace "[Database Name]" with the database name. Finally change "filename.sql" to the correct filename/location.
eg.. to be done from the folder where the sql file is
Quote:

mysql -umyusername -pmypassword mydatabasename > myfilename.sql


All times are GMT +8. The time now is 07:48 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.