homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
phpmyadmin Select INTO OUTFILE
how to
oneill33




msg:4095607
 7:07 pm on Mar 11, 2010 (gmt 0)

how do i extract values of a field in SQL using phpmyadmin when the host is not my localhost ?

The following commands work well on localhost:
SELECT NAME
INTO OUTFILE '/name.txt'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
FROM tablename
;


I've read it should run like this on another host, but it doesnt work:

mysql hostIP username password -e
SELECT name
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
FROM tablename databasename
> emails.txt

Do you know how you run this command in phpmyadmin ?

 

whoisgregg




msg:4103365
 10:16 pm on Mar 23, 2010 (gmt 0)

In phpmyadmin, you'd need to connect to a different host first. Just edit your phpMyAdmin configuration file with additional entries in the $cfg['Servers'] array and you'll be able to switch from one host to another.

brotherhood of LAN




msg:4103376
 10:31 pm on Mar 23, 2010 (gmt 0)

Also fyi, the 'outfile' can only be created on the same server as SQL, i.e. you can't run the query to a remote server and have the file saved locally.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved