Tag : mysql-2
Tag : mysql-2
We can easily export MySQL select query records into CSV file using shell command. Following are couple of ways to do that.
Mysql Load data infile
Here is command for export data using mysql infile. Please keep in mind that, “filename.csv” file will generate it on mysql remote server not on the local server from you are running the command.watch movie Chasing Coral now
mysql --host=$HOST--user=$USER--password=$PASS $DBNAME -e "select * from tablename INTO OUTFILE '/tmp/filename.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';"
Mysql and Sed Command.
It will fetch records using mysql select command and replace each TAB with COMMA(,) and put that replace comma seperate string into file named “filename.csv”. Please keep in mind that it will replace TAB from data returned query as well.
mysql --host=$HOST--user=$USER--password=$PASS $DBNAME -e "select * from tablename" | sed 's/\t/,/g' &gt; filename.csv
Movie ‘Mother!’ was released in September 13, 2017 in genre Drama. Darren Aronofsky was directed this movie and starring by Jennifer Lawrence. This movie tell story about A couple’s relationship is tested when uninvited guests arrive at their home, disrupting their tranquil existence.
Darren Aronofsky, Scott Franklin, Ari Handel.
movie Mother! 2017 trailer, Watch Mother! 2017 Online Putlocker, Watch Mother! 2017 Online Free 123movie, watch Mother! film now, Mother! 2017 streaming, film Mother! 2017, watch film Mother! 2017 now, Watch Mother! 2017 For Free online, Watch Mother! 2017 Online Free hulu, download Mother! movie now, Watch Mother! 2017 Online 123movies, Watch Mother! 2017 Online 123movie, live streaming movie Mother!, Watch Mother! 2017 Online Free netflix, film Mother! 2017 streaming, Mother! 2017 live streaming film online, watch movie Mother! now, Mother! movie, Watch Mother! 2017 Online Free Viooz, film Mother! trailer, Mother! 2017 Watch Online, Mother! 2017 movie download, Streaming Mother! 2017 For Free Online, movie Mother! 2017 download, streaming Mother! movie, watch Mother! 2017 film online now, download movie Mother!, Watch Mother! 2017 Online Megashare, Watch Mother! 2017 Online Free Putlocker, watch full Mother! movie, watch full Mother! 2017 film, film Mother! download, Watch Mother! 2017 Online Viooz, Mother! 2017 film download, Watch Mother! 2017 Online Free, Watch Mother! 2017 Online Free megashare, Streaming Mother! 2017 Online Free Megashare,