{"id":297,"date":"2019-09-15T15:38:14","date_gmt":"2019-09-15T07:38:14","guid":{"rendered":"https:\/\/freeapp.sbs\/blog\/?p=297"},"modified":"2025-04-01T17:01:41","modified_gmt":"2025-04-01T08:01:41","slug":"zkhnwktbs2vrcz3","status":"publish","type":"post","link":"https:\/\/eternalsphere.net\/echoes\/index.php\/2019\/09\/15\/zkhnwktbs2vrcz3\/","title":{"rendered":"Manjaro\u5b89\u88c5MariaDB"},"content":{"rendered":"<p>sudo pacman -S mysql<br \/>\nOutput<br \/>\n[dhani@dhani-manjaro ~]$ sudo pacman -S mysql<br \/>\n:: There are 2 providers available for mysql:<br \/>\n:: Repository extra<br \/>\n1) mariadb<br \/>\n:: Repository community<br \/>\n2) percona-server<br \/>\nEnter a number (default=1):<br \/>\nType 1 to select mariadb package or simply press Enter.<br \/>\nOutput:<br \/>\nResolving dependencies&#8230;<br \/>\nlooking for conflicting packages&#8230;<br \/>\nPackages (4) jemalloc-4.3.1-1 libmariadbclient-10.1.19-1<br \/>\nmariadb-clients-10.1.19-1 mariadb-10.1.19-1<br \/>\nTotal Download Size: 19.44 MiB<br \/>\nTotal Installed Size: 172.45 MiB<br \/>\n:: Proceed with installation? [Y\/n] y<br \/>\nType Y to confirm the installation. Then pacman will download required files from the official repository.<\/p>\n<p>sudo mysql_install_db &#8211;user=mysql &#8211;basedir=\/usr &#8211;datadir=\/var\/lib\/mysql<br \/>\nsudo systemctl start mariadb<br \/>\nsudo mysql_secure_installation<\/p>\n<p>Output:<br \/>\n[dhani@dhani-manjaro ~]$ mysql_secure_installation<br \/>\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<br \/>\nSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!<br \/>\nIn order to log into MariaDB to secure it, we&#8217;ll need the current<br \/>\npassword for the root user. If you&#8217;ve just installed MariaDB, and<br \/>\nyou haven&#8217;t set the root password yet, the password will be blank,<br \/>\nso you should just press enter here.<br \/>\nEnter current password for root (enter for none):<br \/>\nOK, successfully used password, moving on&#8230;<br \/>\nSetting the root password ensures that nobody can log into the MariaDB<br \/>\nroot user without the proper authorisation.<br \/>\nSet root password? [Y\/n] y<br \/>\nNew password:<br \/>\nRe-enter new password:<br \/>\nPassword updated successfully!<br \/>\nReloading privilege tables..<br \/>\n&#8230; Success!<\/p>\n<p>By default, a MariaDB installation has an anonymous user, allowing anyone<br \/>\nto log into MariaDB without having to have a user account created for<br \/>\nthem. This is intended only for testing, and to make the installation<br \/>\ngo a bit smoother. You should remove them before moving into a<br \/>\nproduction environment.<br \/>\nRemove anonymous users? [Y\/n] y<br \/>\n&#8230; Success!<br \/>\nNormally, root should only be allowed to connect from &#8216;localhost&#8217;. This<br \/>\nensures that someone cannot guess at the root password from the network.<br \/>\nDisallow root login remotely? [Y\/n] n<br \/>\n&#8230; skipping.<br \/>\nBy default, MariaDB comes with a database named &#8216;test&#8217; that anyone can<br \/>\naccess. This is also intended only for testing, and should be removed<br \/>\nbefore moving into a production environment.<br \/>\nRemove test database and access to it? [Y\/n] y<br \/>\n&#8211; Dropping test database&#8230;<br \/>\n&#8230; Success!<br \/>\n&#8211; Removing privileges on test database&#8230;<br \/>\n&#8230; Success!<br \/>\nReloading the privilege tables will ensure that all changes made so far<br \/>\nwill take effect immediately.<br \/>\nReload privilege tables now? [Y\/n] y<br \/>\n&#8230; Success!<br \/>\nCleaning up&#8230;<br \/>\nAll done! If you&#8217;ve completed all of the above steps, your MariaDB<br \/>\ninstallation should now be secure.<br \/>\nThanks for using MariaDB!<br \/>\nNote:<br \/>\nUsually, Mariadb root user is none (no pasword). You should change the root password for security reason.<br \/>\nCheck Mariadb Status<\/p>\n<p>sudo systemctl status mariadb<\/p>\n<p>Output:<br \/>\n[dhani@dhani-manjaro ~]$ sudo systemctl status mariadb[sudo] password for dhani: \u25cf mariadb.service &#8211; MariaDB database server Loaded: loaded (\/usr\/lib\/systemd\/system\/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2016-11-25 20:57:21 WIB; 3min 49s ago Process: 2333 ExecStartPost=\/bin\/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0\/SUCCESS) Process: 2248 ExecStartPre=\/bin\/sh -c [ ! -e \/usr\/bin\/galera_recovery ] &amp;&amp; VAR= || VAR=`\/usr\/bin\/galera_recovery`; [ $? -eq 0 ] &amp;&amp; systemctl se Process: 2245 ExecStartPre=\/bin\/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0\/SUCCESS) Main PID: 2303 (mysqld) Status: &#8220;Taking your SQL requests now&#8230;&#8221; Tasks: 27 (limit: 4915) CGroup: \/system.slice\/mariadb.service \u2514\u25002303 \/usr\/sbin\/mysqld<br \/>\nNov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] InnoDB: Highest supported file format is Barracuda.Nov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] InnoDB: 128 rollback segment(s) are active.Nov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] InnoDB: Waiting for purge to startNov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] InnoDB: Percona XtraDB (http:\/\/www.percona.com) 5.6.32-79.0 sNov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] Plugin &#8216;FEEDBACK&#8217; is disabled.Nov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139819646707456 [Note] InnoDB: Dumping buffer pool(s) not yet startedNov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] Server socket created on IP: &#8216;::&#8217;.Nov 25 20:57:21 dhani-manjaro mysqld[2303]: 2016-11-25 20:57:21 139820239334912 [Note] \/usr\/sbin\/mysqld: ready for connections.Nov 25 20:57:21 dhani-manjaro mysqld[2303]: Version: &#8216;10.1.19-MariaDB&#8217; socket: &#8216;\/run\/mysqld\/mysqld.sock&#8217; port: 3306 MariaDB Server<br \/>\nMake sure the status is active. This means that we are successfully installed MySQL Server on Manjaro Linux,<br \/>\n\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<br \/>\nsudo systemctl enable mariadb<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/mariadb.com\/kb\/en\/library\/mysql_secure_installation\/\">https:\/\/mariadb.com\/kb\/en\/library\/mysql_secure_installation\/<\/a><\/p>\n<p><a href=\"https:\/\/manjaro-tutorial.blogspot.com\/2016\/11\/install-mysql-server-on-manjaro-1610.html\">https:\/\/manjaro-tutorial.blogspot.com\/2016\/11\/install-mysql-server-on-manjaro-1610.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>sudo pacman -S mysql Output [dhani@dhani-manjaro ~]$ sudo pacman -S mysql :: There are 2 providers available for mysql: :: Repository extra 1) mariadb :: Repository community 2) percona-server Enter a number (default=1): Type 1 to select mariadb package or simply press Enter. Output: Resolving dependencies&#8230; looking for conflicting packages&#8230; &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"class_list":["post-297","post","type-post","status-publish","format-standard","hentry","category-y8behyrmw-2lc"],"_links":{"self":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/comments?post=297"}],"version-history":[{"count":2,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":3715,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/297\/revisions\/3715"}],"wp:attachment":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/categories?post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}