Question

How can I increase the MySql memory on a wordpress with ubuntu droplet image

Posted February 5, 2020 208 views
WordPressDatabases

My website keeps going down because of MySql which is running on localhost does not have enough computing power to connect to the website. I have increased the ram by resizing the database but that only worked for a day. I have created a database cluster with DO and once I can get into the database on localhost I will migrate it.

My questions are:

  1. How do I increase the memory limit for the database on localhost?
  2. How do I download the database and then upload it to the managed cluster on DO?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @shehethey,

I recently posted an answer on how to use mysqltunner in order to optimize your MySQL database, you can take a look at the instructions here:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Regarding the migration of your database to a Managed MySQL Database, you could either use a tool like DBever or mysqldump in order to backup your database first and then import it to your Managed MySQL Database:

https://www.digitalocean.com/docs/databases/mysql/how-to/import-databases/

Hope that this helps!
Regards,
Bobby

  • Hello,

    I have attempted what you have suggested and that has failed

    root@shehethey:~# wget http://mysqltuner.pl/ -O mysqltuner.pl
    --2020-02-05 15:07:02--  http://mysqltuner.pl/
    Resolving mysqltuner.pl (mysqltuner.pl)... 217.70.184.38
    Connecting to mysqltuner.pl (mysqltuner.pl)|217.70.184.38|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl [following]
    --2020-02-05 15:07:03--  https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
    Resolving raw.github.com (raw.github.com)... 199.232.36.133
    Connecting to raw.github.com (raw.github.com)|199.232.36.133|:443... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl [following]
    --2020-02-05 15:07:03--  https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.36.133
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.36.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 226097 (221K) [text/plain]
    Saving to: ‘mysqltuner.pl’
    
    mysqltuner.pl                    100%[==========================================================>] 220.80K  --.-KB/s    in 0.007s  
    
    2020-02-05 15:07:03 (32.4 MB/s) - ‘mysqltuner.pl’ saved [226097/226097]
    
    root@shehethey:~# perl mysqltuner.pl
     >>  MySQLTuner 1.7.19 - Major Hayden <major@mhtx.net>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    
    [--] Skipped version check for MySQLTuner script
    [!!] Attempted to use login credentials from Debian maintenance account, but they failed.
    root@shehethey:~# 
    
    edited by MattIPv4
Submit an Answer