{"id":673,"date":"2021-06-04T06:03:48","date_gmt":"2021-06-04T06:03:48","guid":{"rendered":"http:\/\/www.peakproductions.at\/sides\/peakproductions\/?p=673"},"modified":"2021-06-04T12:32:11","modified_gmt":"2021-06-04T12:32:11","slug":"ubuntu-server-fuer-webanwendungen-teil-3-mysql","status":"publish","type":"post","link":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/06\/04\/ubuntu-server-fuer-webanwendungen-teil-3-mysql\/","title":{"rendered":"Ubuntu Server f\u00fcr Webanwendungen &#8211; Teil 3 \u2013 mysql"},"content":{"rendered":"\n<p>Apache allein ist in der heutigen Webwelt ein wenig schlank, daher installieren wir hier noch php als Programmiersprache und mysql f\u00fcr die Datenbank.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">mySQL<\/h2>\n\n\n\n<p>Im ersten Schritt wird der mySQL-Server installiert.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install mysql-server<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Secure Installation<\/h3>\n\n\n\n<p>Sicherheitstechnisch empfiehlt es sich dringend danach die secure-Installation auszuf\u00fchren. Dadurch werden Testdatenbanken gel\u00f6scht, Zugriffsrechte f\u00fcr lokale Benutzer eingeschr\u00e4nkt und es kann auch die Kennwortrichtlinie definiert werden.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Darauf folgen mehrere Fragen:<\/h4>\n\n\n\n<p>Passwortsicherheit:<\/p>\n\n\n\n<p>Hier kann gerne mit &#8222;Enter&#8220; weitergesprungen werden. Es empfiehlt sich aber auf jeden Fall ein sicheres Kennwort zu verwenden!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"334\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1024x334.png\" alt=\"\" class=\"wp-image-674\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1024x334.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-300x98.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-768x250.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image.png 1472w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>root Passwort:<\/p>\n\n\n\n<p>Achtung, das Passwort hier hat nichts mit dem root-User von Linux zu tun, es ist das Kennwort f\u00fcr den Datenbank Benutzer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1014\" height=\"310\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1.png\" alt=\"\" class=\"wp-image-675\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1.png 1014w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1-300x92.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-1-768x235.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Anonyme User:<\/p>\n\n\n\n<p>Diese werden in den seltensten F\u00e4llen ben\u00f6tigt und k\u00f6nnen besten Gewissens gel\u00f6scht werden.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"279\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-4-1024x279.png\" alt=\"\" class=\"wp-image-678\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-4-1024x279.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-4-300x82.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-4-768x209.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-4.png 1478w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>root User Rechte:<\/p>\n\n\n\n<p>Der root User sollte nur vom local host aus zugriff haben. Dann kann auch niemand, der das Kennwort herausgefunden hat, \u00fcber die Ferne schaden an der Datenbank anrichten.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"174\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5-1024x174.png\" alt=\"\" class=\"wp-image-679\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5-1024x174.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5-300x51.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5-768x130.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5-1536x260.png 1536w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-5.png 1604w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Testdatenbank:<\/p>\n\n\n\n<p>Die Testdatenbank ist gut f\u00fcr \u00dcbungszwecke, hat aber auf einer Testumgebung nichts verloren und noch weniger in der Produktivumgebung. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"185\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6-1024x185.png\" alt=\"\" class=\"wp-image-680\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6-1024x185.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6-300x54.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6-768x139.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6-1536x278.png 1536w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-6.png 1792w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Rechte anwenden:<\/p>\n\n\n\n<p>Im letzten Schritt wird abgefragt, ob die Tabelle mit den Privilegien, also mit den Rechten neu geladen werden soll. Dies schadet auf jeden Fall nicht und vermeidet seltsame Probleme mit Benutzerrechten.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"125\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7-1024x125.png\" alt=\"\" class=\"wp-image-681\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7-1024x125.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7-300x37.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7-768x93.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7-1536x187.png 1536w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-7.png 1578w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p><strong>Success<\/strong>. Geschafft. Jetzt schnell noch testen. Mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysql<\/code><\/pre>\n\n\n\n<p>sollte auf dem Terminal das mysql Interface auftauchen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"372\" src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8-1024x372.png\" alt=\"\" class=\"wp-image-682\" srcset=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8-1024x372.png 1024w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8-300x109.png 300w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8-768x279.png 768w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8-1536x559.png 1536w, https:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/06\/image-8.png 1672w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>Mit &#8222;exit&#8220; kann das Interface wieder verlassen werden. Die Datenbank und Benutzer werden in einem weiteren Beitrag angelegt.<\/p>\n\n\n\n<p>Weiter gehts mit php \ud83d\ude42<\/p>\n\n\n\n<p><strong><a href=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/06\/04\/ubuntu-server-fuer-webanwendungen-teil-4-php\/\" data-type=\"post\" data-id=\"684\"><span class=\"has-inline-color has-accent-color\">Ubuntu Server f\u00fcr Webanwendungen &#8211; Teil 4 \u2013 php<\/span><\/a><\/strong><\/p>\n\n\n\n<p><strong><a href=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/05\/29\/ubuntu-server-fuer-webanwendungen-teil-2-tools-und-apache\/\" data-type=\"post\" data-id=\"651\"><span class=\"has-inline-color has-accent-color\">Ubuntu Server f\u00fcr Webanwendungen \u2013 Teil 2 Tools und Apache<\/span><\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache allein ist in der heutigen Webwelt ein wenig schlank, daher installieren wir hier noch php als Programmiersprache und mysql f\u00fcr die Datenbank. mySQL Im ersten Schritt wird der mySQL-Server installiert. Secure Installation Sicherheitstechnisch empfiehlt es sich dringend danach die secure-Installation auszuf\u00fchren. Dadurch werden Testdatenbanken gel\u00f6scht, Zugriffsrechte f\u00fcr lokale Benutzer eingeschr\u00e4nkt und es kann auch &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/06\/04\/ubuntu-server-fuer-webanwendungen-teil-3-mysql\/\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eUbuntu Server f\u00fcr Webanwendungen &#8211; Teil 3 \u2013 mysql\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":689,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[17,21,18,19,20,16],"class_list":["post-673","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-tipps-und-tricks","tag-apache","tag-lamp","tag-linux","tag-mysql","tag-php","tag-webdev"],"_links":{"self":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/comments?post=673"}],"version-history":[{"count":4,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":695,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/673\/revisions\/695"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/media\/689"}],"wp:attachment":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/media?parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/categories?post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/tags?post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}