{"id":454,"date":"2021-03-01T13:40:09","date_gmt":"2021-03-01T04:40:09","guid":{"rendered":"https:\/\/www.tiptip.today\/?p=454"},"modified":"2021-03-04T08:43:41","modified_gmt":"2021-03-03T23:43:41","slug":"mysql-mariadb-basic-command-for-beginners-with-python","status":"publish","type":"post","link":"https:\/\/tippang.net\/?p=454","title":{"rendered":"MySql\/MariaDB basic command for beginners with Python"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-455\" src=\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\" alt=\"\" width=\"339\" height=\"296\" srcset=\"https:\/\/tippang.net\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png 1280w, https:\/\/tippang.net\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280-300x262.png 300w, https:\/\/tippang.net\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280-1024x894.png 1024w, https:\/\/tippang.net\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280-768x671.png 768w\" sizes=\"(max-width: 339px) 100vw, 339px\" \/><\/p>\n<p>Let&#8217;s go for MySql DB, Step by Step<\/p>\n<p>Step 1. Setup MySql Program<br \/>\n1.1 Install Mysql DB from Web (<a href=\"https:\/\/www.mysql.com\/\" target=\"_blank\" rel=\"noopener\">Download<\/a>)<br \/>\n1.2 pip install pymysql (for python)<!--more--><\/p>\n<p>Step 2. Create\/Assign Database, User, Permission<br \/>\n2.1 Login Mysql DB(command) : &#8220;mysql -u root -p&#8221;<br \/>\n2.2 Create Database: &#8220;create database sample1;&#8221;<br \/>\n&lt;Sameple1 = database name&gt;<br \/>\n2.3 Assign permission to DB : &#8220;<span lang=\"ko\">grant all privileges on sample1.* to &#8216;user1&#8217;@&#8217;<\/span><span lang=\"en-US\">localhost<\/span><span lang=\"ko\">&#8216; identified by &#8216;pass&#8217;;&#8221;<br \/>\n&lt;User1 = username, pass = password for user1&gt;<br \/>\n2.4 Apply to DB : &#8220;flush privileges;&#8221;<\/span><\/p>\n<p>Step 3. Remove User\/Role\/Database<br \/>\n3.1 Remove DB : &#8220;drop database sample1;&#8221;<br \/>\n3.2 Remove User1 : &#8220;drop user &#8216;user1&#8217;@localhost;&#8221;<br \/>\n3.3 Remove User1 : &#8220;drop user user1;&#8221;<\/p>\n<p>Step x. Others<br \/>\nx.1 All permission to All DB : &#8220;grant all privileges on *.* to user1@localhost identified by &#8216;pass&#8217; with grant options;&#8221;<br \/>\nx.2 limited permission to DB : &#8220;grant select, insert, update on sample1.* to user1@localhost identified by &#8216;pass&#8221;<br \/>\nx.3 limited permission to DB : &#8220;grant all privileges on sample1.* to user1@localhost identified by &#8216;pass&#8221;<br \/>\nx.4 Show table structure : &#8220;show columns from tablename;&#8221;<br \/>\nx.5 Check privileges on DB : &#8220;show grants for sample1@&#8217;%&#8217;;&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>continued&#8230;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s go for MySql DB, Step by Step Step 1. Setup MySql Program 1.1 Install<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"footnotes":""},"categories":[7,18],"tags":[35],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-itexpert","category-python","tag-mysql-python-maria"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySql\/MariaDB basic command for beginners with Python - tippang.net<\/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:\/\/tippang.net\/?p=454\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"MySql\/MariaDB basic command for beginners with Python - tippang.net\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:description\" content=\"Let&#8217;s go for MySql DB, Step by Step Step 1. Setup MySql Program 1.1 Install\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tippang.net\/?p=454\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"tippang.net\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-01T04:40:09+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-03T23:43:41+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"author\" content=\"Charles\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:data1\" content=\"Charles\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/tippang.net\/?p=454#article\",\"isPartOf\":{\"@id\":\"https:\/\/tippang.net\/?p=454\"},\"author\":{\"name\":\"Charles\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86\"},\"headline\":\"MySql\/MariaDB basic command for beginners with Python\",\"datePublished\":\"2021-03-01T04:40:09+00:00\",\"dateModified\":\"2021-03-03T23:43:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tippang.net\/?p=454\"},\"wordCount\":185,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/tippang.net\/#organization\"},\"image\":{\"@id\":\"https:\/\/tippang.net\/?p=454#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\",\"keywords\":[\"mysql python maria\"],\"articleSection\":[\"ITEXPERT\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/tippang.net\/?p=454#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tippang.net\/?p=454\",\"url\":\"https:\/\/tippang.net\/?p=454\",\"name\":\"MySql\/MariaDB basic command for beginners with Python - tippang.net\",\"isPartOf\":{\"@id\":\"https:\/\/tippang.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tippang.net\/?p=454#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tippang.net\/?p=454#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\",\"datePublished\":\"2021-03-01T04:40:09+00:00\",\"dateModified\":\"2021-03-03T23:43:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/tippang.net\/?p=454#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tippang.net\/?p=454\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tippang.net\/?p=454#primaryimage\",\"url\":\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\",\"contentUrl\":\"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tippang.net\/?p=454#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tippang.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySql\/MariaDB basic command for beginners with Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tippang.net\/#website\",\"url\":\"https:\/\/tippang.net\/\",\"name\":\"tippang.net\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/tippang.net\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tippang.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/tippang.net\/#organization\",\"name\":\"tippang.net\",\"url\":\"https:\/\/tippang.net\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png\",\"contentUrl\":\"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png\",\"width\":280,\"height\":280,\"caption\":\"tippang.net\"},\"image\":{\"@id\":\"https:\/\/tippang.net\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86\",\"name\":\"Charles\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar\",\"caption\":\"Charles\"},\"description\":\"An IT Guy On earth\",\"sameAs\":[\"https:\/\/www.tiptip.today\"],\"url\":\"https:\/\/tippang.net\/author\/cm201705\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySql\/MariaDB basic command for beginners with Python - tippang.net","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:\/\/tippang.net\/?p=454","og_locale":"en_US","og_type":"article","og_title":"MySql\/MariaDB basic command for beginners with Python - tippang.net","og_description":"Let&#8217;s go for MySql DB, Step by Step Step 1. Setup MySql Program 1.1 Install","og_url":"https:\/\/tippang.net\/?p=454","og_site_name":"tippang.net","article_published_time":"2021-03-01T04:40:09+00:00","article_modified_time":"2021-03-03T23:43:41+00:00","og_image":[{"url":"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png","type":"","width":"","height":""}],"author":"Charles","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Charles","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tippang.net\/?p=454#article","isPartOf":{"@id":"https:\/\/tippang.net\/?p=454"},"author":{"name":"Charles","@id":"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86"},"headline":"MySql\/MariaDB basic command for beginners with Python","datePublished":"2021-03-01T04:40:09+00:00","dateModified":"2021-03-03T23:43:41+00:00","mainEntityOfPage":{"@id":"https:\/\/tippang.net\/?p=454"},"wordCount":185,"commentCount":0,"publisher":{"@id":"https:\/\/tippang.net\/#organization"},"image":{"@id":"https:\/\/tippang.net\/?p=454#primaryimage"},"thumbnailUrl":"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png","keywords":["mysql python maria"],"articleSection":["ITEXPERT","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tippang.net\/?p=454#respond"]}]},{"@type":"WebPage","@id":"https:\/\/tippang.net\/?p=454","url":"https:\/\/tippang.net\/?p=454","name":"MySql\/MariaDB basic command for beginners with Python - tippang.net","isPartOf":{"@id":"https:\/\/tippang.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tippang.net\/?p=454#primaryimage"},"image":{"@id":"https:\/\/tippang.net\/?p=454#primaryimage"},"thumbnailUrl":"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png","datePublished":"2021-03-01T04:40:09+00:00","dateModified":"2021-03-03T23:43:41+00:00","breadcrumb":{"@id":"https:\/\/tippang.net\/?p=454#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tippang.net\/?p=454"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tippang.net\/?p=454#primaryimage","url":"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png","contentUrl":"https:\/\/www.tiptip.today\/wp-content\/uploads\/2021\/03\/database-schema-1895779_1280.png"},{"@type":"BreadcrumbList","@id":"https:\/\/tippang.net\/?p=454#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tippang.net\/"},{"@type":"ListItem","position":2,"name":"MySql\/MariaDB basic command for beginners with Python"}]},{"@type":"WebSite","@id":"https:\/\/tippang.net\/#website","url":"https:\/\/tippang.net\/","name":"tippang.net","description":"","publisher":{"@id":"https:\/\/tippang.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tippang.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/tippang.net\/#organization","name":"tippang.net","url":"https:\/\/tippang.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tippang.net\/#\/schema\/logo\/image\/","url":"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png","contentUrl":"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png","width":280,"height":280,"caption":"tippang.net"},"image":{"@id":"https:\/\/tippang.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86","name":"Charles","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tippang.net\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar","contentUrl":"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar","caption":"Charles"},"description":"An IT Guy On earth","sameAs":["https:\/\/www.tiptip.today"],"url":"https:\/\/tippang.net\/author\/cm201705"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=454"}],"version-history":[{"count":8,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":503,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions\/503"}],"wp:attachment":[{"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}