Tonje Solberg
  • Hem
  • IT
  • Foto
  • Kundtjänst
  • Microsoft 365
  • Administrativt
  • Om
  • Blog
Tonje Solberg
Install | MySQL | Ubuntu
25/12/2022 Av Tonje

MySQL on Ubuntu Server

Structured Query Language (SQL) is used for communicating with databases, and MySQL is a popular database management system (DBMS), read more here, as well as a part of the LAMP-stack.

Let’s start by updating the package manager cache, run the command “sudo apt update”

Then install MySQL with the command “sudo apt install mysql-server”
Write “y” to continue

MySQL is now installed on the Ubuntu Server, the next step is optional but recommended.

MySQL comes with a pre-installed security script, run this with the command “sudo mysql_secure_installation”

Whether or not you choose to enable “validate password component”, one should always use strong and unique passwords.

There will be questions about anonymous users, test database, and remote logins, it can be wise to answer “y” to remove and disable these.

Then answer “y” to reload for the changes to take effect immediately in MySQL


If you encounter this problem:

Resolve it by switching to another tty, for example with “CTRL + ALT + F2”

Run the command “sudo killall -9 mysql_secure_installation” in the other tty, in this example tty2. Then see how it has terminated the mysql secure installation in the original tty

Then start MySQL with the command “sudo mysql” and run this SQL query: “ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘insert password here’ ; “
and then type “exit” to leave MySQL

Now run the mysql security script again with the command “sudo mysql_secure_installation”


To enter MySQL as the root user, run the command “mysql -u root -p“

To leave MySQL, run the command “exit”

Learn more about SQL and queries here

Sources

MySQL Tutorial: https://www.mysqltutorial.org/what-is-mysql/
IBM: https://www.ibm.com/topics/lamp-stack
W3Schools: https://www.w3schools.com/sql/default.asp
All images: Solberg, 2022

Tags:alter user anonymous user apt install database database management system databases dbms error exit install installation lamp lamp-stack linux mysql mysql -u rot -p mysql secure installation mysql server package manager cache password passwords queries query reload privilege tables remote login root user securing the mysql server deployment security script server sql sql queries sql query structured query language sudo apt install sudo killall sudo mysql switch tty termination test database tty ubuntu ubuntu server validate password component
Previous PostApache on Ubuntu Server
Next PostPHP on Ubuntu Server

Recent Posts

Låsa rader i Excel
Excel | Microsoft 365
Infoga kryssrutor i Excel
Excel | Microsoft 365
Kommentarer i Word
Microsoft 365 | Word
Skapa tusentals mappar från lista i Excel
Excel | Microsoft 365
Kolla vad Google vet om dig
Google
Flaggor i Excel på 1-2-3
Excel | Microsoft 365
Skapa automatiskt bildspel i PowerPoint
Microsoft 365 | PowerPoint | Presentation
Färdigheter en kundtjänstmedarbetare behöver
Kundtjänst

Senaste inlägg

  • Låsa rader i Excel20/09/2023
  • Infoga kryssrutor i Excel07/09/2023
  • Kommentarer i Word14/08/2023
  • Skapa tusentals mappar från lista i Excel10/08/2023
Läs mer

Kategorier

  • Active Directory
  • Apache
  • AWS
  • Climate
  • Cloud
  • Cyber Security
  • Excel
  • Google
  • Hyper-V
  • Hypervisor
  • IIS
  • Install
  • Kundtjänst
  • Linux
  • Microsoft 365
  • Mint
  • MySQL
  • Network
  • Notion
  • PHP
  • Planera
  • PowerPoint
  • PowerShell
  • Presentation
  • Prioritera
  • Problemlösning
  • Python
  • Server
  • SQL
  • Storage
  • Tools
  • Ubuntu
  • Virtual Machine
  • VirtualBox
  • Virtualization
  • Windows
  • Word

abstracted active directory administratör apache applications att göra automatisk bare-metal browser computer name consolidation contention cooling cpu database databases dc device disk file domain controller efficient use excel exit failure full virtualization guests hardware high availability hypervisor i/o requests init init 0 install installation installing iso file keyboard layout kund kunder kundservice kundtjänst kundtjänstmedarbetare lamp lamp-stack linux lista localhost lyssna management memory microsoft 365 name network network connections networking notion operating system optimizing oracle vm virtualbox owner package manager cache passwd password physical hardware physical resources planera power powershell prioritera problemlösning ram reboot requests restart run as administrator server server manager servers software start storage sudo sudo apt install type ubuntu ubuntu server user version virtualbox virtualbox guest additions virtualbox manager virtualization virtual machine virtual machines web server windows windows powershell windows server windows server 2019 workloads

Follow

Follow
IT
  • Linux
  • Windows
  • Server
  • Virtualization
Senaste

© 2023 Tonje Solberg

  • Hem
  • IT
  • Foto
  • Kundtjänst
  • Microsoft 365
  • Administrativt
  • Om
  • Blog