how to import mysql file from link?

seachen

Verified User
Joined
Feb 3, 2007
Messages
495
how to import mysql file from link?

for example, i have upload a 100mb mysql file on internet. eg http://www.abc.com/xyz.sql

how do i import this database to user account.

(assume abc.com is the user account)
 
If you have access to the command line you could import it from there. There are tons of how-to's on how to do this: http://www.google.com/search?q=impo...s=org.mozilla:en-US:official&client=firefox-a

If you don't, or don't want to risk any problems, you could import the file in chunks into phpmyadmin (but with a file that big you'd be in for a lot of work). You would break the sql into <2MB pieces, and upload each one (and being very careful not to break the SQL statements).
 
If you have access to the command line you could import it from there. There are tons of how-to's on how to do this: http://www.google.com/search?q=impo...s=org.mozilla:en-US:official&client=firefox-a

If you don't, or don't want to risk any problems, you could import the file in chunks into phpmyadmin (but with a file that big you'd be in for a lot of work). You would break the sql into <2MB pieces, and upload each one (and being very careful not to break the SQL statements).
may i know how do i split the sql file?
 
may i know how do i split the sql file?

One way is by hand. Open the file in a text editor, and start cutting and pasting individual pieces of the sql.

This is very time consuming and slow, and you have to be careful not to make the sql invalid by cutting up lines. (just make sure you always go to the end of the line, ';' when deciding where to cut)
 
Code:
$ wget http://www.abc.com/xyz.sql
$ mysql -u<username> -p<password> mydbname < xyz.sql

username and password is "directadmin username and password" or mysql "database username and password"?
 
right. actually each DA syncs the user accounts to mysql user accounts too, so a DA user account should work too.

the DA user account will have access to all the databases owned by that user.

additionally, user/pass created in the DA mysql user level interface will work as well, but only for the db you created the account for.
 
Back
Top