{"id":115,"date":"2019-06-24T12:42:26","date_gmt":"2019-06-24T02:42:26","guid":{"rendered":"http:\/\/stuff.magicwilly.home\/?p=115"},"modified":"2019-06-24T12:42:26","modified_gmt":"2019-06-24T02:42:26","slug":"create-sql-databases","status":"publish","type":"post","link":"http:\/\/stuff2.mygeekvps.net\/index.php\/2019\/06\/24\/create-sql-databases\/","title":{"rendered":"Create SQL databases"},"content":{"rendered":"<pre lang=\"python\" cssfile=\"none\">\n#!\/usr\/bin\/env python3\nimport mysql.connector\nweblist = [\"ericafox\", \"ericascott\", \"ericastevens\", \"samarafox\", \"samarastevens\", \"williamscott\", \"woodytheduck\"]\nmydb = mysql.connector.connect(\n  host=\"localhost\",\n  user=\"superuser\",\n  passwd=\"superuserpassword\"\n)\nmycursor = mydb.cursor()\nfor site in weblist:\n    mycursor.execute(\"CREATE DATABASE \" + site)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#!\/usr\/bin\/env python3 import mysql.connector weblist = [&#8220;ericafox&#8221;, &#8220;ericascott&#8221;, &#8220;ericastevens&#8221;, &#8220;samarafox&#8221;, &#8220;samarastevens&#8221;, &#8220;williamscott&#8221;, &#8220;woodytheduck&#8221;] mydb = mysql.connector.connect( host=&#8221;localhost&#8221;, user=&#8221;superuser&#8221;, passwd=&#8221;superuserpassword&#8221; ) mycursor = mydb.cursor() for site in weblist: mycursor.execute(&#8220;CREATE DATABASE &#8221; + site)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":0,"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"wp:attachment":[{"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/stuff2.mygeekvps.net\/index.php\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}