{"id":2722,"date":"2013-08-29T14:22:31","date_gmt":"2013-08-29T14:22:31","guid":{"rendered":"http:\/\/www.withdata.com\/ad\/?p=2722"},"modified":"2013-08-29T14:34:08","modified_gmt":"2013-08-29T14:34:08","slug":"how-to-execute-sql-file-at-mysql-command-line","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/mysql\/how-to-execute-sql-file-at-mysql-command-line.html","title":{"rendered":"How to execute sql file at MySQL command line"},"content":{"rendered":"<p>If you\u2019re at the <a href=\"https:\/\/www.mysql.com\/\">MySQL<\/a> command line mysql&gt; you can declare the <a href=\"https:\/\/en.wikipedia.org\/wiki\/SQL\">SQL<\/a> file as source, like:<\/p>\n<pre>mysql&gt; source 'path\/to\/test.sql';<\/pre>\n<p>Or use the MySQL command line client:<\/p>\n<pre>mysql -hhostname -uuser database &lt; path\/to\/test.sql<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re at the MySQL command line mysql&gt; you can declare the SQL file as source, like: mysql&gt; source &#8216;path\/to\/test.sql&#8217;; Or use the MySQL command line client: mysql -hhostname -uuser database &lt; path\/to\/test.sql<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[73,463,1323],"class_list":["post-2722","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-command-line","tag-command-line-execute-sql","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=2722"}],"version-history":[{"count":2,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2722\/revisions"}],"predecessor-version":[{"id":2726,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/2722\/revisions\/2726"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=2722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=2722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=2722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}