Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
MySQL
(edit)
Revision as of 10:03, 1 October 2015
317 bytes added
,
10:03, 1 October 2015
no edit summary
Line 28:
Line 28:
restore .sql.gz
restore .sql.gz
zcat /path/to/file.sql.gz | mysql -u 'root' -p 'password' your_database
zcat /path/to/file.sql.gz | mysql -u 'root' -p 'password' your_database
+
+
=== Save SELECT to file ===
+
SELECT hostname FROM VTS_sistema WHERE INTO LOCAL OUTFILE '/tmp/hostnames_VTS_sistema' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
+
+
mysql -h20.1.40.66 -u xe50582 -p -D workflow -e "SELECT hostname FROM controles_sistemas WHERE cod_plataforma='UNX'" > hostnames_unix_workflow.txt
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version