{"id":853,"date":"2020-04-02T18:42:52","date_gmt":"2020-04-02T16:42:52","guid":{"rendered":"https:\/\/blog.mhasin.eu\/?p=853"},"modified":"2020-04-08T12:41:01","modified_gmt":"2020-04-08T10:41:01","slug":"debian-10-phpmyadmin","status":"publish","type":"post","link":"https:\/\/blog.mhasin.eu\/?p=853","title":{"rendered":"Debian 10 phpmyadmin"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>apt install php php-mysql php-mbstring php-zip php-gd apache2\ncd \/tmp\nwget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/4.9.0.1\/phpMyAdmin-4.9.0.1-all-languages.tar.gz\ntar xvf phpMyAdmin-4.9.0.1-all-languages.tar.gz\nmv phpMyAdmin-4.9.0.1-all-languages\/ \/usr\/share\/phpmyadmin\nmkdir -p \/var\/lib\/phpmyadmin\/tmp\nchown -R www-data:www-data \/var\/lib\/phpmyadmin\n cp \/usr\/share\/phpmyadmin\/config.sample.inc.php \/usr\/share\/phpmyadmin\/config.inc.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/usr\/share\/phpmyadmin\/config.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$cfg['blowfish_secret'] = 'velmidlhzstringpreheslo'; \/* YOU MUST FILL IN THIS FOR COOKIE AUTH! *\/\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Vygenerovanie hesla:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install pwgen\npwgen -s 32 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pridanie konfigur\u00e1cie:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$cfg['TempDir'] = '\/var\/lib\/phpmyadmin\/tmp';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nastavenie pou\u017e\u00edvate\u013ea pre phpmyadmin<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* User used to manipulate with storage *\/\n\/\/ $cfg['Servers'][$i]['controlhost'] = '';\n\/\/ $cfg['Servers'][$i]['controlport'] = '';\n$cfg['Servers'][$i]['controluser'] = 'pma';\n$cfg['Servers'][$i]['controlpass'] = 'password';\n\n\n\n\/* Storage database and tables *\/\n$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';\n$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';\n$cfg['Servers'][$i]['relation'] = 'pma__relation';\n$cfg['Servers'][$i]['table_info'] = 'pma__table_info';\n$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';\n$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';\n$cfg['Servers'][$i]['column_info'] = 'pma__column_info';\n$cfg['Servers'][$i]['history'] = 'pma__history';\n$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';\n$cfg['Servers'][$i]['tracking'] = 'pma__tracking';\n$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';\n$cfg['Servers'][$i]['recent'] = 'pma__recent';\n$cfg['Servers'][$i]['favorite'] = 'pma__favorite';\n$cfg['Servers'][$i]['users'] = 'pma__users';\n$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';\n$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';\n$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';\n$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';\n$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';\n$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Import sch\u00e9my phpmyadmin<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> mariadb < \/usr\/share\/phpmyadmin\/sql\/create_tables.sql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pridanie nastavenia apache2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/apache2\/conf-available\/phpmyadmin.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># phpMyAdmin default Apache configuration\n\nAlias \/phpmyadmin \/usr\/share\/phpmyadmin\n\n<Directory \/usr\/share\/phpmyadmin>\n    Options SymLinksIfOwnerMatch\n    DirectoryIndex index.php\n\n    <IfModule mod_php5.c>\n        <IfModule mod_mime.c>\n            AddType application\/x-httpd-php .php\n        <\/IfModule>\n        <FilesMatch \".+\\.php$\">\n            SetHandler application\/x-httpd-php\n        <\/FilesMatch>\n\n        php_value include_path .\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/php-gettext\/:\/usr\/share\/php\/php-php-gettext\/:\/usr\/share\/javascript\/:\/usr\/share\/php\/tcpdf\/:\/usr\/share\/doc\/phpmyadmin\/:\/usr\/share\/php\/phpseclib\/\n        php_admin_value mbstring.func_overload 0\n    <\/IfModule>\n    <IfModule mod_php.c>\n        <IfModule mod_mime.c>\n            AddType application\/x-httpd-php .php\n        <\/IfModule>\n        <FilesMatch \".+\\.php$\">\n            SetHandler application\/x-httpd-php\n        <\/FilesMatch>\n\n        php_value include_path .\n        php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp\n        php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/php-gettext\/:\/usr\/share\/php\/php-php-gettext\/:\/usr\/share\/javascript\/:\/usr\/share\/php\/tcpdf\/:\/usr\/share\/doc\/phpmyadmin\/:\/usr\/share\/php\/phpseclib\/\n        php_admin_value mbstring.func_overload 0\n    <\/IfModule>\n\n<\/Directory>\n\n# Authorize for setup\n<Directory \/usr\/share\/phpmyadmin\/setup>\n    <IfModule mod_authz_core.c>\n        <IfModule mod_authn_file.c>\n            AuthType Basic\n            AuthName \"phpMyAdmin Setup\"\n            AuthUserFile \/etc\/phpmyadmin\/htpasswd.setup\n        <\/IfModule>\n        Require valid-user\n    <\/IfModule>\n<\/Directory>\n\n# Disallow web access to directories that don't need it\n<Directory \/usr\/share\/phpmyadmin\/templates>\n    Require all denied\n<\/Directory>\n<Directory \/usr\/share\/phpmyadmin\/libraries>\n    Require all denied\n<\/Directory>\n<Directory \/usr\/share\/phpmyadmin\/setup\/lib>\n    Require all denied\n<\/Directory><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Na\u010d\u00edtanie konfigur\u00e1cie:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a2enconf phpmyadmin.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl reload apache2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Vytvorenie mysql pou\u017e\u00edvate\u013ea:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'myuser' IDENTIFIED BY 'mypassword';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Priradenie prav MYSQL pou\u017e\u00edvate\u013eovi<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON *.* TO 'sammy'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Aplikovanie pr\u00e1v:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"265\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image-1024x265.png\" alt=\"\" class=\"wp-image-857\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image-1024x265.png 1024w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image-300x78.png 300w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image-768x199.png 768w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image-1536x398.png 1536w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/image.png 1914w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLQUA\" \/><input type=\"hidden\" name=\"blogName\" value=\"c\/LxdwcA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"szA1BgA=\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"c0lNykzMUzA0UCjIKMitTEzJzcwDAA==\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLdW3L7C1MDUGAA==\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"y00syfcwNAIA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtA1MNE1MFIwtLAyMLEyNQIA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7VnbcuM2En3nV\/RypqLd2ZCUPVdfa5UZO1bFtmYtOVtTtSkVTEAk1rwgAKiL\/2E\/Io\/7kF\/Iy2T\/axsgJVOWFFOeVO1LWDU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sijC+yyMUVjKBuzYWS6d3rt1YNrvvfRxOYj8nX8FSsl+329O07i4SvXwD09s276c7enkXC9y9A2nn98s305V5plPl4OlYJsbfzauLavMGpwIM1\/xr+nJKpZxNh30ZQTP+Cv+0xqio\/XQgwI8tEPHb+Bw==\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"https:\/\/blog.mhasin.eu\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">\u00a0\u00a0<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">\u00a0\u00a0<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"Config: Vygenerovanie hesla: Pridanie konfigur\u00e1cie: Nastavenie pou\u017e\u00edvate\u013ea pre phpmyadmin Import sch\u00e9my phpmyadmin Pridanie nastavenia apache2 Na\u010d\u00edtanie konfigur\u00e1cie: Vytvorenie mysql pou\u017e\u00edvate\u013ea: Priradenie prav MYSQL pou\u017e\u00edvate\u013eovi Aplikovanie pr\u00e1v: \u00a0\u00a0 Send article as PDF \u00a0\u00a0\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"arc_restricted_post":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-853","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=853"}],"version-history":[{"count":6,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/853\/revisions"}],"predecessor-version":[{"id":915,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/853\/revisions\/915"}],"wp:attachment":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}