Lightsail ubuntu mysql 8

0

I am trying to install MySql 8 on my ubuntu 20.04 lightsail without any success. Server doesn't start after install mysql -V mysql Ver 8.0.34-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

sudo systemctl start mysql Failed to start mysql.service: Unit mysql.service not found.

Installing on the $3.5 package is there a limitation?

asked 8 months ago469 views
3 Answers
0

Hello.

Would it be possible for you to share the commands you used for the installation?
Perhaps the MySQL server is not installed.

profile picture
EXPERT
answered 8 months ago
  • If you are using Ubuntu 20.04, the following command will install the MySQL server.

    sudo apt update
    sudo apt install mysql-server -y
    sudo systemctl start mysql
    
  • I installed it with the above command. However, we have confirmed that an error occurs when trying to start the MySQL server. One possible cause is insufficient memory, as shown in the following syslog. Perhaps Lightsail at $3.5 a month is not enough spec to run MySQL.

    Sep  4 12:56:12 ip-172-26-15-94 kernel: [  226.248936] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/mysq
    l.service,task=mysqld,pid=4120,uid=113
    Sep  4 12:56:12 ip-172-26-15-94 kernel: [  226.248944] Out of memory: Killed process 4120 (mysqld) total-vm:307040kB, anon-rss:199228kB, file-rss:2164kB, shmem-rss:0kB, UI
    D:113 pgtables:560kB oom_score_adj:0
    Sep  4 12:56:12 ip-172-26-15-94 kernel: [  226.270609] oom_reaper: reaped process 4120 (mysqld), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: mysql.service: Failed with result 'signal'.
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: Failed to start MySQL Community Server.
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: Stopped MySQL Community Server.
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: mysql.service: Start request repeated too quickly.
    Sep  4 12:56:12 ip-172-26-15-94 systemd[1]: mysql.service: Failed with result 'signal'.
    
0

I used sudo apt install mysql-client-core-8.0

Thanks looks like it is because of the insufficient RAM - 512 as the MySQl wont start. Got simalar errors Riku_Kobayashi got.

Will try on the 2GB RAM instance and see. That one has MySQL server 5.7 and needs an upgrade to 8.

Also it is running on ubuntu 18.04 and needs updating to 22.04. Can I just do Run 'do-release-upgrade' to upgrade to it. Thanks

answered 8 months ago
0

You can also create MySQL or PostgreSQL database instances on Amazon Lightsail. More info on this here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-databases.

AWS
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions