Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 02-19-2009, 03:30 PM Importing .sql
RadGH's Avatar
Skilled Talker

Posts: 76
Name: Radley
Trades: 0
I've googled a bit but haven't found anything that suits what I need. For some reason our host although it has phpMyAdmin, does not have upload.php for it. IDK why, but we need an alternate solution to uploading our .sql file.

I read you can use a command line, but have no idea how and would prefer a different method. I tried a command line using exec, however nothing appeared to happen and it did not output any errors.

I want to post this as I look a bit harder, to maybe save some time later. Thanks.
RadGH is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-19-2009, 03:45 PM Re: Importing .sql
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
If you can upload the file to your host, then an php exec() call can import it, if the server accepts such calls to be made.
The syntax is:
Code:
/usr/bin/mysql -u $username -p$password $dbName< $fullPathToFile
Another solution would be, if your hoster allows remote connection to the DB, to create a user that can connect through the network, and using a mysql frontend tool like mysl query browser to connect via the network to your server and send the SQL file via this channel.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-19-2009, 04:00 PM Re: Importing .sql
Defies a Status

Posts: 1,606
Trades: 0
You can open the file in notepad if it isn't real large>>contrlC>> and then paste that into the query window. Does the exact same thing as import.

What kind of host does not fully support the import?
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Importing .sql
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11843 seconds with 12 queries