{"id":214,"date":"2007-05-15T10:11:47","date_gmt":"2007-05-15T00:11:47","guid":{"rendered":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/"},"modified":"2020-12-21T20:26:35","modified_gmt":"2020-12-21T10:26:35","slug":"connecting-to-mysql-from-command-line-eg-putty-shh","status":"publish","type":"post","link":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/","title":{"rendered":"Connecting to mysql from command line (eg: PuTTY, ssh)"},"content":{"rendered":"<p><strong>Question:<\/strong>  How do I connect to mysql database server from command line such as <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\">PuTTY<\/a> and ssh?  <\/p>\n<p><strong>Answer:<\/strong> The syntax to connect to mysql from command line is as below:<\/p>\n<p><code>mysql -uUSERNAME -hHOST -pPASSWORD<\/code><\/p>\n<p>Replace USERNAME, HOST and PASSWORD with your actual username, host (database server) and password.  <\/p>\n<h3>Are you a developer? Want to get a promotion, work on interesting projects, land a high paying job at a tech company or stand out from the crowd? <\/h3>\n<h4>Then this ebook is for you!<\/h4>\n<p><a href=\"https:\/\/gumroad.com\/l\/softwaredevelopers\" target=\"_blank\" rel=\"noopener noreferrer\">Career Guide for Software Developers<\/a><\/p>\n<div class=\"align-center\"><a href=\"https:\/\/gumroad.com\/l\/softwaredevelopers\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\" width=\"600\" alt=\"Career Guide for Software Developers\"><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Question: How do I connect to mysql database server from command line such as PuTTY<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-214","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"og:description\" content=\"Question: How do I connect to mysql database server from command line such as PuTTY\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Leadership Advice &amp; Resources\" \/>\n<meta property=\"article:published_time\" content=\"2007-05-15T00:11:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-21T10:26:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\" \/>\n<meta name=\"author\" content=\"Isabel Nyo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Isabel Nyo\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\"},\"author\":{\"name\":\"Isabel Nyo\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"headline\":\"Connecting to mysql from command line (eg: PuTTY, ssh)\",\"datePublished\":\"2007-05-15T00:11:47+00:00\",\"dateModified\":\"2020-12-21T10:26:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\"},\"wordCount\":92,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\",\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\",\"name\":\"Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources\",\"isPartOf\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\",\"datePublished\":\"2007-05-15T00:11:47+00:00\",\"dateModified\":\"2020-12-21T10:26:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage\",\"url\":\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\",\"contentUrl\":\"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eisabainyo.net\/weblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Connecting to mysql from command line (eg: PuTTY, ssh)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#website\",\"url\":\"https:\/\/eisabainyo.net\/weblog\/\",\"name\":\"Career Resources for Professionals in Tech\",\"description\":\"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors\",\"publisher\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab\",\"name\":\"Isabel Nyo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g\",\"caption\":\"Isabel Nyo\"},\"logo\":{\"@id\":\"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/\"},\"description\":\"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more..\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/","og_locale":"en_US","og_type":"article","og_title":"Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources","og_description":"Question: How do I connect to mysql database server from command line such as PuTTY","og_url":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/","og_site_name":"Tech Leadership Advice &amp; Resources","article_published_time":"2007-05-15T00:11:47+00:00","article_modified_time":"2020-12-21T10:26:35+00:00","og_image":[{"url":"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg","type":"","width":"","height":""}],"author":"Isabel Nyo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Isabel Nyo"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#article","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/"},"author":{"name":"Isabel Nyo","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"headline":"Connecting to mysql from command line (eg: PuTTY, ssh)","datePublished":"2007-05-15T00:11:47+00:00","dateModified":"2020-12-21T10:26:35+00:00","mainEntityOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/"},"wordCount":92,"commentCount":3,"publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage"},"thumbnailUrl":"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/","url":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/","name":"Connecting to mysql from command line (eg: PuTTY, ssh) | Tech Leadership Advice &amp; Resources","isPartOf":{"@id":"https:\/\/eisabainyo.net\/weblog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage"},"image":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage"},"thumbnailUrl":"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg","datePublished":"2007-05-15T00:11:47+00:00","dateModified":"2020-12-21T10:26:35+00:00","breadcrumb":{"@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#primaryimage","url":"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg","contentUrl":"https:\/\/static-2.gumroad.com\/res\/gumroad\/6009293493815\/asset_previews\/effd399f91656e11650733264eb1f73f\/retina\/careerguide-poster.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/eisabainyo.net\/weblog\/2007\/05\/15\/connecting-to-mysql-from-command-line-eg-putty-shh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eisabainyo.net\/weblog\/"},{"@type":"ListItem","position":2,"name":"Connecting to mysql from command line (eg: PuTTY, ssh)"}]},{"@type":"WebSite","@id":"https:\/\/eisabainyo.net\/weblog\/#website","url":"https:\/\/eisabainyo.net\/weblog\/","name":"Career Resources for Professionals in Tech","description":"Books, worksheets, templates, frameworks and other useful resources for Chief Technology Officers (CTOs), VPs of Engineering &amp; Technology Directors","publisher":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eisabainyo.net\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/33457dd19f1ad9bbd4b0cb50c54dfcab","name":"Isabel Nyo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3d4b1a4e0f425adb39b242b0d62c5fac07c82f8314a24631f1d16f47bdf006d8?s=96&d=mm&r=g","caption":"Isabel Nyo"},"logo":{"@id":"https:\/\/eisabainyo.net\/weblog\/#\/schema\/person\/image\/"},"description":"My interests: Web Development, Web Design, Web Applications, Web 2.0, AJAX, Search Engine Optimisation, Latest Technologies and more.."}]}},"_links":{"self":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":1,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"predecessor-version":[{"id":3411,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/posts\/214\/revisions\/3411"}],"wp:attachment":[{"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eisabainyo.net\/weblog\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}