{"id":32,"date":"2009-01-20T17:46:56","date_gmt":"2009-01-20T17:46:56","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=32"},"modified":"2010-07-17T01:35:47","modified_gmt":"2010-07-17T01:35:47","slug":"commonly-used-mysql-commands","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2009\/01\/commonly-used-mysql-commands\/","title":{"rendered":"Commonly Used MySQL Commands."},"content":{"rendered":"<p><strong>To login from linux shell<\/strong> &#8211;<br \/>\nMysql&gt;;\u00a0 -h hostname -u root -p<\/p>\n<p><strong>List all available databases with that username.<\/strong><br \/>\nShow databases;<\/p>\n<p><strong>To use a database &#8211;<\/strong><br \/>\nUse dbname;<\/p>\n<p><strong>To see tables within selected database;<\/strong><br \/>\nshow tables;<\/p>\n<p><strong>To see table field formats;<\/strong><br \/>\ndescribe [xyzTableName];<\/p>\n<p><strong>To delete database &#8211;<\/strong><br \/>\nDrop database [xyzDatabase];<br \/>\n<strong><br \/>\nTo delete a table \u2013<\/strong><br \/>\nDrop table [xyzTableName];<\/p>\n<p><strong>Show all data in a table \u2013<\/strong><br \/>\nSELECT * FROM\u00a0 xyzTableName;<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To login from linux shell &#8211; Mysql&gt;;\u00a0 -h hostname -u root -p List all available databases with that username. Show databases; To use a database &#8211; Use dbname; To see tables within selected database; show tables; To see table field formats; describe [xyzTableName]; To delete database &#8211; Drop database [xyzDatabase]; To delete a table \u2013 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":32,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":870,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions\/870"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}