<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MySQL_%2F_MariaDB</id>
	<title>MySQL / MariaDB - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MySQL_%2F_MariaDB"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=MySQL_/_MariaDB&amp;action=history"/>
	<updated>2026-06-04T13:07:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=MySQL_/_MariaDB&amp;diff=122&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system.  ADD: https://dev.mysql.com/doc/refman/8.0/en/memory-use.html  ==== Installation ==== ----    yum install mariadb-server mariadb -y  apt-get install mariadb mariadb-server   ==== Post-install Configuration ==== ----  (Recommend running these in order)  Start the MySQL service:  # sysVinit  service mysqld start  service mariadb start    # Systemd  systemctl st...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=MySQL_/_MariaDB&amp;diff=122&amp;oldid=prev"/>
		<updated>2024-08-27T00:48:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system.  ADD: https://dev.mysql.com/doc/refman/8.0/en/memory-use.html  ==== Installation ==== ----    yum install mariadb-server mariadb -y  apt-get install mariadb mariadb-server   ==== Post-install Configuration ==== ----  (Recommend running these in order)  Start the MySQL service:  # sysVinit  service mysqld start  service mariadb start    # Systemd  systemctl st...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system.&lt;br /&gt;
&lt;br /&gt;
ADD: https://dev.mysql.com/doc/refman/8.0/en/memory-use.html&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 yum install mariadb-server mariadb -y&lt;br /&gt;
 apt-get install mariadb mariadb-server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Post-install Configuration ====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
(Recommend running these in order)&lt;br /&gt;
&lt;br /&gt;
Start the MySQL service:&lt;br /&gt;
 # sysVinit&lt;br /&gt;
 service mysqld start&lt;br /&gt;
 service mariadb start &lt;br /&gt;
&lt;br /&gt;
 # Systemd&lt;br /&gt;
 systemctl start mysql&lt;br /&gt;
 systemctl start mysql&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable service to start it upon boot up:&lt;br /&gt;
 systemctl enable mariadb&lt;br /&gt;
 chkconfig mysql on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To configure your mysql/mariadb for the very first time to secure it, run the following command below:&lt;br /&gt;
:* Set mysql root password.&lt;br /&gt;
:* Remove root accounts that are accessible from outside the local host.&lt;br /&gt;
:* Remove anonymous-user accounts.&lt;br /&gt;
:* Remove the test database, which by default can be accessed by anonymous users.&lt;br /&gt;
:* [https://mariadb.com/kb/en/mysql_secure_installation/ More info.]&lt;br /&gt;
 mysql_secure_installation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Login mariadb/mysql as root:&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the database prompt, run the following commands for basic setup:&lt;br /&gt;
 # Create the user&lt;br /&gt;
 CREATE USER &amp;#039;admin&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;PASSwoRD&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
 # Create the database&lt;br /&gt;
 CREATE DATABASE database_name;&lt;br /&gt;
 &lt;br /&gt;
 # Grant privileges to newly created DB&lt;br /&gt;
 GRANT ALL PRIVILEGES ON database_name.* TO &amp;#039;admin&amp;#039;@&amp;#039;localhost&amp;#039;;&lt;br /&gt;
 FLUSH PRIVILEGES;&lt;br /&gt;
 &lt;br /&gt;
 # Confirm DB was created:&lt;br /&gt;
 SHOW DATABASES;&lt;br /&gt;
 &lt;br /&gt;
 # Confirm grants:&lt;br /&gt;
 SHOW GRANTS FOR &amp;#039;admin&amp;#039;@&amp;#039;localhost&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
 # Quit&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other useful commands, for instance to see what is your “site_url” option_id 1 and “home” option_id 2.&lt;br /&gt;
 SELECT * FROM wp_options WHERE option_value=“https://siteurl.com”;&lt;br /&gt;
 SELECT * FROM wp_options WHERE option_id=“1”;&lt;br /&gt;
 SELECT * FROM wp_options WHERE option_id=“2”;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuration Files====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For most systems the MySQL configuration file is: &amp;lt;b&amp;gt;/etc/my.cnf&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default &amp;lt;b&amp;gt;port&amp;lt;/b&amp;gt; for MySQL is &amp;lt;b&amp;gt;3306&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Database files: &amp;lt;b&amp;gt;/var/lib/mysql&amp;lt;/b&amp;gt;&lt;br /&gt;
* Usually &amp;lt;b&amp;gt;/var/lib/mysql&amp;lt;/b&amp;gt; (or /var/db/mysql) directory used to store database and tales under UNIX like operating systems. You can use the following command to locate MySQL datadir: &lt;br /&gt;
 $ grep datadir /etc/my.cnf&lt;br /&gt;
 datadir=/var/lib/mysql&lt;br /&gt;
(In the Filesystem Hierarchy Standard, /var/lib is listed as containing: State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Bitnami Configuration files=====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MySQL Version&lt;br /&gt;
 mysqld --version&lt;br /&gt;
&lt;br /&gt;
MySQL Configuration File&lt;br /&gt;
 /opt/bitnami/mysql/my.cnf&lt;br /&gt;
* Some configuration overrides are stored in &lt;br /&gt;
 /opt/bitnami/mysql/bitnami/my.cnf.&lt;br /&gt;
&lt;br /&gt;
MySQL Socket&lt;br /&gt;
* On Unix, MySQL clients can connect to the server in the local machine using an Unix socket file at &lt;br /&gt;
 /opt/bitnami/mysql/tmp/mysql.sock&lt;br /&gt;
&lt;br /&gt;
MySQL Process Identification Number&lt;br /&gt;
* The MySQL .pid file allows other programs to find out the PID (Process Identification Number) of a running script. Find it at &lt;br /&gt;
 /opt/bitnami/mysql/data/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
MySQL Error Log&lt;br /&gt;
* The log-error file contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running. If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log.&lt;br /&gt;
 /opt/bitnami/mysql/data/mysqld.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
https://docs.bitnami.com/bch/infrastructure/mysql/get-started/understand-default-config/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to create a back up (dump file) and restore DB====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
*[[Bitnami#How_to_Backup_and_Restore_Bitnami_Mysql_Database |&amp;lt;b&amp;gt;Bitnami&amp;lt;/b&amp;gt; way]]: https://docs.bitnami.com/ibm/apps/redmine/administration/backup-restore-mysql-mariadb/&lt;br /&gt;
&lt;br /&gt;
* The way I did it for my site:&lt;br /&gt;
 $ mysqldump --user=&amp;lt;user&amp;gt;--password=&amp;lt;password&amp;gt; &amp;lt;DB Table name&amp;gt; &amp;gt; dikapedia.sql&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://phoenixnap.com/kb/how-to-backup-restore-a-mysql-database &amp;lt;/br&amp;gt;&lt;br /&gt;
https://wordpress.org/support/article/restoring-your-database-from-backup/&lt;br /&gt;
&lt;br /&gt;
Can also use PhpMyAdmin to backup and restore if they are using that. &amp;lt;/br&amp;gt;&lt;br /&gt;
https://support.managed.com/kb/a2034/how-to-backup-and-or-restore-your-mysql-database-using-phpmyadmin.aspx&lt;br /&gt;
&lt;br /&gt;
If you run into issues with importing using PhpMyAdmin because the .sql file is large, see: phpMyAdmin - Error &amp;gt; Incorrect format parameter?&amp;lt;/br&amp;gt;&lt;br /&gt;
https://stackoverflow.com/questions/50690076/phpmyadmin-error-incorrect-format-parameter&lt;br /&gt;
&amp;lt;/br&amp;gt; It is suggested to increase the values of two variables in php.ini file. Change following in php.ini&lt;br /&gt;
 upload_max_filesize=64M&lt;br /&gt;
 post_max_size=64M&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to drop database (delete database)====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
https://mariadb.com/kb/en/drop-database/&lt;br /&gt;
&lt;br /&gt;
 DROP DATABASE bufg;&lt;br /&gt;
 Query OK, 0 rows affected (0.39 sec)&lt;br /&gt;
 &lt;br /&gt;
 DROP DATABASE bufg;&lt;br /&gt;
 ERROR 1008 (HY000): Can&amp;#039;t drop database &amp;#039;bufg&amp;#039;; database doesn&amp;#039;t exist&lt;br /&gt;
 &lt;br /&gt;
  \W&lt;br /&gt;
 Show warnings enabled. &lt;br /&gt;
 &lt;br /&gt;
 DROP DATABASE IF EXISTS bufg;&lt;br /&gt;
 Query OK, 0 rows affected, 1 warning (0.00 sec)&lt;br /&gt;
 Note (Code 1008): Can&amp;#039;t drop database &amp;#039;bufg&amp;#039;; database doesn&amp;#039;t exist&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== MySQL Crashing due to Out of Memory =====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Ever get this message when trying to reach this wiki?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;Sorry! This site is experiencing technical difficulties.&amp;lt;/B&amp;gt;&amp;lt;/br&amp;gt;&lt;br /&gt;
Try waiting a few minutes and reloading.&lt;br /&gt;
&lt;br /&gt;
(Cannot access the database)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check database status:&lt;br /&gt;
 systemctl status mariadb&lt;br /&gt;
&lt;br /&gt;
Notice the MariaDB database server failed:&lt;br /&gt;
 ● mariadb.service - MariaDB database server&lt;br /&gt;
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)&lt;br /&gt;
   Active: failed (Result: exit-code) since Thu 2020-01-16 04:22:48 UTC; 1min 31s ago&lt;br /&gt;
  Process: 27485 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)&lt;br /&gt;
  Process: 27484 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)&lt;br /&gt;
  Process: 27449 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)&lt;br /&gt;
 Main PID: 27484 (code=exited, status=0/SUCCESS)&lt;br /&gt;
 &lt;br /&gt;
 Jan 16 04:22:47 ip-172-31-33-239.ec2.internal systemd[1]: Starting MariaDB database server...&lt;br /&gt;
 Jan 16 04:22:47 ip-172-31-33-239.ec2.internal mariadb-prepare-db-dir[27449]: Database MariaDB is probably &lt;br /&gt;
 initialized in /var/lib/mysql already, nothing is done.&lt;br /&gt;
 Jan 16 04:22:47 ip-172-31-33-239.ec2.internal mysqld_safe[27484]: 200116 04:22:47 mysqld_safe Logging to &amp;#039;/var/log/mariadb/mariadb.log&amp;#039;.&lt;br /&gt;
 Jan 16 04:22:47 ip-172-31-33-239.ec2.internal mysqld_safe[27484]: 200116 04:22:47 mysqld_safe Starting &lt;br /&gt;
 mysqld daemon with databases from /var/lib/mysql&lt;br /&gt;
 Jan 16 04:22:48 ip-172-31-33-239.ec2.internal systemd[1]: mariadb.service: control process exited, code=exited status=1&lt;br /&gt;
 Jan 16 04:22:48 ip-172-31-33-239.ec2.internal systemd[1]: Failed to start MariaDB database server.&lt;br /&gt;
 Jan 16 04:22:48 ip-172-31-33-239.ec2.internal systemd[1]: Unit mariadb.service entered failed state.&lt;br /&gt;
 Jan 16 04:22:48 ip-172-31-33-239.ec2.internal systemd[1]: mariadb.service failed.&lt;br /&gt;
&lt;br /&gt;
Why did it fail? Check the logs: /var/log/mariadb/mariadb.log&lt;br /&gt;
 cat /var/log/mariadb/mariadb.log&lt;br /&gt;
 cat /var/log/mariadb/mariadb.log | grep -i error&lt;br /&gt;
 tail /var/log/mariadb/mariadb.log&lt;br /&gt;
&lt;br /&gt;
Out of Memory; &amp;quot;Needed 128917504 bytes&amp;quot;:&lt;br /&gt;
 # cat mariadb.log | grep -i error&lt;br /&gt;
 200115  4:20:05 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)&lt;br /&gt;
 200115  4:20:05 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)&lt;br /&gt;
 200115  4:20:05 InnoDB: Fatal error: cannot allocate memory for the buffer pool&lt;br /&gt;
 200115  4:20:05 [ERROR] Plugin &amp;#039;InnoDB&amp;#039; init function returned error.&lt;br /&gt;
 200115  4:20:05 [ERROR] Plugin &amp;#039;InnoDB&amp;#039; registration as a STORAGE ENGINE failed.&lt;br /&gt;
 200115  4:20:05 [ERROR] Unknown/unsupported storage engine: InnoDB&lt;br /&gt;
 200115  4:20:05 [ERROR] Aborting&lt;br /&gt;
 200116  4:20:27 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)&lt;br /&gt;
 200116  4:20:27 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)&lt;br /&gt;
 200116  4:20:27 [ERROR] mysqld: Out of memory (Needed 72499200 bytes)&lt;br /&gt;
 200116  4:20:27 InnoDB: Fatal error: cannot allocate memory for the buffer pool&lt;br /&gt;
 200116  4:20:27 [ERROR] Plugin &amp;#039;InnoDB&amp;#039; init function returned error.&lt;br /&gt;
 200116  4:20:27 [ERROR] Plugin &amp;#039;InnoDB&amp;#039; registration as a STORAGE ENGINE failed.&lt;br /&gt;
 200116  4:20:27 [ERROR] Unknown/unsupported storage engine: InnoDB&lt;br /&gt;
 200116  4:20:27 [ERROR] Aborting&lt;br /&gt;
&lt;br /&gt;
Check your system&amp;#039;s memory... Hmm.. but it says we have 145M available... &lt;br /&gt;
 [root@ip-172-31-33-239 mariadb]# free -mh&lt;br /&gt;
               total        used        free      shared  buff/cache   available&lt;br /&gt;
 Mem:           461M        303M         57M        504K         99M        145M&lt;br /&gt;
 Swap:            0B          0B          0B&lt;br /&gt;
 [root@ip-172-31-33-239 mariadb]# free -h&lt;br /&gt;
               total        used        free      shared  buff/cache   available&lt;br /&gt;
 Mem:           461M        303M         57M        504K         99M        145M&lt;br /&gt;
 Swap:            0B          0B          0B&lt;br /&gt;
 [root@ip-172-31-33-239 mariadb]# free -m&lt;br /&gt;
               total        used        free      shared  buff/cache   available&lt;br /&gt;
 Mem:            461         303          57           0          99         145&lt;br /&gt;
 Swap:             0           0           0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The issue is due to &amp;lt;b&amp;gt;&amp;#039;Performance Schema&amp;#039;&amp;lt;/b&amp;gt; [1]. The MySQL Performance Schema is a feature for monitoring MySQL Server execution at a low level [2]. &lt;br /&gt;
&lt;br /&gt;
When starting up, it allocates all the RAM it needs. By default, it will use around 400MB of RAM, which is quite significant for a small virtual machine (t3a.micro). If you add in default InnoDB buffer pool setting of 128MB, then you&amp;#039;re well over 512MB RAM, not including other things from the OS. &lt;br /&gt;
&lt;br /&gt;
As a fix, according to document [1], disable performance schema under the [mysqld] section of the mysql/mariadb configuration file &amp;#039;&amp;lt;b&amp;gt;/etc/my.cnf&amp;lt;/b&amp;gt;&amp;#039;. (I&amp;#039;ve just disabled this, so lets see if it actually fixes it... Today is 1/16/2020 :&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 performance_schema=off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information about performance schema:&amp;lt;/br&amp;gt;&lt;br /&gt;
[1] [https://mariadb.com/resources/blog/starting-mysql-on-low-memory-virtual-machines/ Starting MySQL On Low Memory Virtual Machines]&amp;lt;/br&amp;gt;&lt;br /&gt;
[2] [https://dev.mysql.com/doc/refman/8.0/en/performance-schema.html Chapter 26 MySQL Performance Schema]&amp;lt;/br&amp;gt;&lt;br /&gt;
[3] [https://dev.mysql.com/doc/refman/5.6/en/performance-schema-startup-configuration.html 22.3 Performance Schema Startup Configuration]&amp;lt;/br&amp;gt;&lt;br /&gt;
[4] [https://serverfault.com/questions/564748/mysql-mariadb-crashes-frequently MySQL (MariaDB) crashes frequently]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== MySQL error: &amp;#039;Access denied for user &amp;#039;root&amp;#039;@&amp;#039;localhost&amp;#039; (Regain Root access)=====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I have worked cases where users were unable to login using their &amp;#039;root&amp;#039; user and password. Users would get the error: &amp;lt;b&amp;gt;&amp;#039;Access denied for user &amp;#039;root&amp;#039;@&amp;#039;localhost&amp;#039;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, follow the steps below:&lt;br /&gt;
&lt;br /&gt;
1) Edit the MySQL configuration file to add line &amp;quot;skip-grant-tables&amp;quot; under the [mysqld] section:&lt;br /&gt;
 $ sudo vi /opt/bitnami/mysql/my.cnf&lt;br /&gt;
 &lt;br /&gt;
 # Added line &amp;quot;skip-grant-tables&amp;quot; like so:&lt;br /&gt;
 [mysqld]&lt;br /&gt;
 ...&lt;br /&gt;
 skip-grant-tables&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
2) Restarted the MySQL service:&lt;br /&gt;
 $ sudo systemctl restart mysqld&lt;br /&gt;
 $ sudo service mysqld restart&lt;br /&gt;
 &lt;br /&gt;
 # Bitnami&lt;br /&gt;
 $ sudo /opt/bitnami/ctlscript.sh restart&lt;br /&gt;
&lt;br /&gt;
3) Login to MySQL using &amp;#039;root&amp;#039; user:&lt;br /&gt;
 $ mysql -u root mysql&lt;br /&gt;
&lt;br /&gt;
4) Update root password and flush privileges by running the following commands:&lt;br /&gt;
 mysql&amp;gt; update user set plugin=&amp;#039;mysql_native_password&amp;#039; where User=&amp;#039;root&amp;#039;;&lt;br /&gt;
 mysql&amp;gt; flush privileges;&lt;br /&gt;
 mysql&amp;gt; exit;&lt;br /&gt;
&lt;br /&gt;
5) Restart the MySQL service:&lt;br /&gt;
 $ sudo /opt/bitnami/ctlscript.sh restart&lt;br /&gt;
&lt;br /&gt;
6) You were then able to login using the new &amp;#039;root&amp;#039; user&amp;#039;s password:&lt;br /&gt;
 $ mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
7) *NOTE* We did not do this step during our conversation but I recommend doing so. Please comment out the line &amp;quot;skip-grant-tables&amp;quot; under the [mysqld] section of the file &amp;quot;/opt/bitnami/mysql/my.cnf&amp;quot; as it is no longer needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&amp;lt;/br&amp;gt;&lt;br /&gt;
https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost&amp;lt;/br&amp;gt;&lt;br /&gt;
https://intellipaat.com/community/10852/mysql-error-access-denied-for-user-root-localhost&amp;lt;/br&amp;gt;&lt;br /&gt;
https://stackoverflow.com/questions/1708409/how-to-start-mysql-with-skip-grant-tables/51111334&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[Bitnami]&amp;lt;/b&amp;gt; Modify the MySQL administrator password: https://docs.bitnami.com/aws/apps/processmakerenterprise/administration/change-reset-password/&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Understand the default MySQL configuration &lt;br /&gt;
https://docs.bitnami.com/bch/infrastructure/mysql/get-started/understand-default-config/&lt;br /&gt;
&lt;br /&gt;
 Start or stop services &lt;br /&gt;
https://docs.bitnami.com/bch/apps/wordpress/administration/control-services/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to check wp_options &amp;#039;siteurl&amp;#039; and &amp;#039;home&amp;#039;====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Reference: https://mariadb.com/resources/blog/how-to-install-and-run-wordpress-with-mariadb/&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 MariaDB [(none)]&amp;gt; use wordpress_db;&lt;br /&gt;
 &lt;br /&gt;
 MariaDB [wordpress_db]&amp;gt; explain wp_options;&lt;br /&gt;
 +--------------+---------------------+------+-----+---------+----------------+&lt;br /&gt;
 | Field        | Type                | Null | Key | Default | Extra          |&lt;br /&gt;
 +--------------+---------------------+------+-----+---------+----------------+&lt;br /&gt;
 | option_id    | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;
 | option_name  | varchar(64)         | NO   | UNI |         |                |&lt;br /&gt;
 | option_value | longtext            | NO   |     | NULL    |                |&lt;br /&gt;
 | autoload     | varchar(20)         | NO   |     | yes     |                |&lt;br /&gt;
 +--------------+---------------------+------+-----+---------+----------------+&lt;br /&gt;
 4 rows in set (0.01 sec)&lt;br /&gt;
  &lt;br /&gt;
 MariaDB [wordpress-db]&amp;gt; SELECT * FROM wp_options WHERE option_name = &amp;#039;home&amp;#039;;&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
 | option_id | option_name | option_value                 | autoload |&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
 |         2 | home        | https://website.com | yes      |&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
 1 row in set (0.00 sec) &lt;br /&gt;
 &lt;br /&gt;
 MariaDB [wordpress-db]&amp;gt; SELECT * FROM wp_options WHERE option_name = &amp;#039;siteurl&amp;#039;;&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
 | option_id | option_name | option_value                 | autoload |&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
 |         1 | siteurl     | https://website.com | yes      |&lt;br /&gt;
 +-----------+-------------+------------------------------+----------+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to change wp_options &amp;#039;siteurl&amp;#039; and &amp;#039;home&amp;#039;====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 MariaDB [(none)]&amp;gt; use wordpress-db   &lt;br /&gt;
   &lt;br /&gt;
 MariaDB [(none)]&amp;gt; SELECT * FROM wp_options WHERE option_name = &amp;#039;home&amp;#039;;  &lt;br /&gt;
 MariaDB [(none)]&amp;gt; UPDATE wp_options SET option_value=&amp;quot;https://soundchiropractic.co&amp;quot; WHERE option_name = &amp;quot;home&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
 MariaDB [(none)]&amp;gt; SELECT * FROM wp_options WHERE option_name = &amp;#039;siteurl&amp;#039;; &lt;br /&gt;
 MariaDB [(none)]&amp;gt; UPDATE wp_options SET option_value=&amp;quot;https://soundchiropractic.co&amp;quot;  WHERE option_name = &amp;quot;siteurl;  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== What to do if you want to move MySQL database from secondary volume to the root volume =====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
What that engineer did was tell the customer to:&lt;br /&gt;
# Check &amp;lt;b&amp;gt;/etc/my.cnf&amp;lt;/b&amp;gt;&lt;br /&gt;
# change &amp;#039;datadir=/var/lib/mysql&amp;#039;  —&amp;gt; datadir= /rescue/var/lib/mysql&lt;br /&gt;
# Restart mysql to see if it works and it did. So now the customer just have to move all their files from /rescue/var/lib/mysql to /var/lib/mysql, and revert the change back to datadir=/var/lib/mysq&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Robert&amp;#039;s alternative way:&lt;br /&gt;
 # stop the mysql service&lt;br /&gt;
 $ systemctl stop mysql&lt;br /&gt;
 &lt;br /&gt;
 $ mount -o bind /var/lib/mysql /mnt/var/lib/mysql&lt;br /&gt;
 $ mount -o bind /etc/mysql /mnt/etc/mysql&lt;br /&gt;
  &lt;br /&gt;
 # then start mysql service&lt;br /&gt;
 $ systemctl start mysql&lt;br /&gt;
 &lt;br /&gt;
 # connect to mysql DB&lt;br /&gt;
 $ mysql -u root -p&lt;br /&gt;
 &lt;br /&gt;
 # then show databases&lt;br /&gt;
 SHOW DATABASES;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[[WordPress|&amp;lt;b&amp;gt;WordPress&amp;lt;/b&amp;gt;]] site gets &amp;quot;Error establishing database connection&amp;quot;====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Most likely due to out of memory, mysql is down, or corrupted table (from my experience). Check the following logs:&lt;br /&gt;
 $ grep -i &amp;quot;memory&amp;quot; /var/log/messages&lt;br /&gt;
 $ grep -i &amp;quot;memory&amp;quot; /var/log/mariadb/mariadb.log&lt;br /&gt;
 &lt;br /&gt;
 # Bitnami MySQL logs:&lt;br /&gt;
 /opt/bitnami/mysql/data/mysqld.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[[WordPress|&amp;lt;b&amp;gt;WordPress&amp;lt;/b&amp;gt;]] database error Table … is marked as crashed and should be repaired====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
https://chrisjean.com/fix-wordpress-database-table-marked-crashed/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Preferred method (manual)&amp;lt;/b&amp;gt;:&lt;br /&gt;
 [user@server ~/public_html]$ mysql -u user -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 1120449&lt;br /&gt;
 Server version: 5.1.48 MySQL Community Server (GPL)&lt;br /&gt;
 &lt;br /&gt;
 Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
 This software comes with ABSOLUTELY NO WARRANTY. This is free software,&lt;br /&gt;
 and you are welcome to modify and redistribute it under the GPL v2 license&lt;br /&gt;
 &lt;br /&gt;
 Type &amp;#039;help;&amp;#039; or &amp;#039;\h&amp;#039; for help. Type &amp;#039;\c&amp;#039; to clear the current input statement. &lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; connect database&lt;br /&gt;
 Connection id:    1120477&lt;br /&gt;
 Current database: database &lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; select * from prefix_posts limit 1;&lt;br /&gt;
 ERROR 2006 (HY000): MySQL server has gone away&lt;br /&gt;
 No connection. Trying to reconnect...&lt;br /&gt;
 Connection id:    1120568&lt;br /&gt;
 Current database: database &lt;br /&gt;
 &lt;br /&gt;
 ERROR 145 (HY000): Table &amp;#039;./database/prefix_posts&amp;#039; is marked as crashed and should be repaired&lt;br /&gt;
 mysql&amp;gt; repair table prefix_posts;&lt;br /&gt;
 +-----------------------+--------+----------+----------+&lt;br /&gt;
 | Table                 | Op     | Msg_type | Msg_text |&lt;br /&gt;
 +-----------------------+--------+----------+----------+&lt;br /&gt;
 | database.prefix_posts | repair | status   | OK       |&lt;br /&gt;
 +-----------------------+--------+----------+----------+&lt;br /&gt;
 1 row in set (3.56 sec) &lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; select * from prefix_posts limit 1;&lt;br /&gt;
 +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+&lt;br /&gt;
 | ID | post_author | post_date           | post_date_gmt       | post_content | post_title | post_category | post_excerpt | post_status | comment_status | ping_status | post_password | post_name | to_ping | pinged | post_modified       | post_modified_gmt   | post_content_filtered | post_parent | guid                                                       | menu_order | post_type  | post_mime_type | comment_count |&lt;br /&gt;
 +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+&lt;br /&gt;
 | 12 |           8 | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 |              | 308image1  |             0 |              | inherit     | open           | open        |               | 308image1 |         |        | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 |                       |           0 | http://gaarai.com/wp-content/uploads/2008/05/308image1.gif |          0 | attachment | image/gif      |             0 |&lt;br /&gt;
 +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+&lt;br /&gt;
 1 row in set (0.00 sec)&lt;br /&gt;
 &lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
 Bye&lt;br /&gt;
 [user@server ~/public_html]$&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Repairing Tables with phpMyAdmin&amp;lt;/b&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For you, you might prefer to use phpMyAdmin. Fortunately, repairing a table with phpMyAdmin is easy.&lt;br /&gt;
# Log in to your phpMyAdmin or connect to it via your cPanel back-end.&lt;br /&gt;
# Select the database with the crashed table.&lt;br /&gt;
# Put a checkmark next to each crashed table.&lt;br /&gt;
# Select “Repair table” from the “With selected:” drop down at the bottom of the list.&lt;br /&gt;
# Let phpMyAdmin do its thing.&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>