MySQL commands: Difference between revisions

Jump to navigation Jump to search
76 bytes added ,  1 January 2016
Line 1: Line 1:


=== Preparation ===
=== Preparation ===
install MySQL database client apps ex: {{kbd | key=mysql}} & {{kbd | key=mysqldump}} commands
* {{Linux}}:
* {{Win}}: Install (1) [https://www.cygwin.com/ Cygwin], (2) search mysql & install MySQL database clients apps package
* {{Mac}}: Install [https://www.apachefriends.org/zh_tw/download.html XAMPP]. Path of {{kbd | key=mysql}} executable file is: /Applications/xampp/xamppfiles/bin/mysql
create the db user
create the db user
# create the db user
# create the db user
Line 6: Line 11:
# the db user will be able to execute the mysqldump command
# the db user will be able to execute the mysqldump command


MySQL database clients ex: {{kbd | key=mysql}} & {{kbd | key=mysqldump}} commands
(optional) install the [http://www.ivarch.com/programs/pv.shtml Pipe Viewer] (pv) package
* {{Linux}}:  
* {{Linux}}:  
* {{Win}}:
*# [http://www.tecmint.com/enable-rpmforge-repository/ How to Enable RPMForge Repository in RHEL/CentOS 7.x/6.x/5.x/4.x]
* {{Mac}}: Install [https://www.apachefriends.org/zh_tw/download.html XAMPP]. Path of {{kbd | key=mysql}} executable file is: /Applications/xampp/xamppfiles/bin/mysql
*# (1){{kbd | key =yum install pv}} for RHEL / CentOS / SL / Fedora Linux<ref>[http://www.cyberciti.biz/open-source/command-line-hacks/pv-command-examples/ Linux / Unix pv Command: Monitor Progress of Data Sent Via a Pipe]</ref>;  (2) {{kbd | key =apt-get install pv}} for Debian / Ubuntu<ref>[http://www.ivarch.com/programs/pv.shtml ivarch.com: Pipe Viewer]</ref>;  
 
* {{Win}}: Install (1) [https://www.cygwin.com/ Cygwin], (2) search pv & install pv package
(optoinal) install the Pipe Viewer (pv) package
* {{Mac}}: Install (1) {{kbd | key =brew install pv}} to get the latest version of pv package<ref>[http://ashleyangell.com/2013/11/pipe-viewer-pv-in-mac-osx/ Pipe Viewer (pv) in Mac OSX]</ref> and (2) MySQL database clients from [https://www.apachefriends.org/zh_tw/download.html XAMPP]. Path of mysql is: /Applications/xampp/xamppfiles/bin/mysql
# [http://www.tecmint.com/enable-rpmforge-repository/ How to Enable RPMForge Repository in RHEL/CentOS 7.x/6.x/5.x/4.x]
# install [http://www.ivarch.com/programs/pv.shtml Pipe Viewer]
#* {{Linux}}: (1){{kbd | key =yum install pv}} for RHEL / CentOS / SL / Fedora Linux<ref>[http://www.cyberciti.biz/open-source/command-line-hacks/pv-command-examples/ Linux / Unix pv Command: Monitor Progress of Data Sent Via a Pipe]</ref>;  (2) {{kbd | key =apt-get install pv}} for Debian / Ubuntu<ref>[http://www.ivarch.com/programs/pv.shtml ivarch.com: Pipe Viewer]</ref>;  
#* {{Win}}: Install (1) [https://www.cygwin.com/ Cygwin], (2) pv package and (3) MySQL database clients apps package
#* {{Mac}}: Install (1) {{kbd | key =brew install pv}} to get the latest version of pv package<ref>[http://ashleyangell.com/2013/11/pipe-viewer-pv-in-mac-osx/ Pipe Viewer (pv) in Mac OSX]</ref> and (2) MySQL database clients from [https://www.apachefriends.org/zh_tw/download.html XAMPP]. Path of mysql is: /Applications/xampp/xamppfiles/bin/mysql


=== Exporting data into MySql sql file ===
=== Exporting data into MySql sql file ===

Navigation menu