Difference between revisions of "MySQL"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
Line 43: Line 43:
* <code>sudo apt upgrade</code>
* <code>sudo apt upgrade</code>
Now you can go ahead & pretend they haven't dropped MySQL from the Debian repos...
Now you can go ahead & pretend they haven't dropped MySQL from the Debian repos...
= Configure MySQL =
*<code>sudo mysql_secure_installation</code>
**<u>Would you like to setup VALIDATE PASSWORD component?</u>
***I select <span style="color: rgb(22, 145, 121);" >No</span> (because I'd rather manage my own password policies, thanks...)
**'''''root password'''''
***<u>Please set the password for root here.</u>
****<span style="color: rgb(22, 145, 121);" >Pick a good '''root''' password...</span>
**or... (depends on install...)
***<u>Using existing password for root.</u>
****Say <span style="color: rgb(22, 145, 121);" >No</span> (Which actually means yes... The question being asked is "Change the password for root?")
**<u>Remove anonymous users?</u>
***Duh... <span style="color: rgb(22, 145, 121);" >Yes</span>
**<u>Disallow root login remotely?</u>
***Your choice, but I tend to say <span style="color: rgb(22, 145, 121);" >No</span>.
**<u>Remove test database and access to it?</u>
***Duh... <span style="color: rgb(22, 145, 121);" >Yes</span> again.
**<u>Reload privilege tables now?</u>
***<span style="color: rgb(22, 145, 121);" >Yes</span>
*([[MySQL - Initial Configuration{{!}}Extra Instructions if you've never configured MySQL before]])


[[Category:ServerBuilding]]
[[Category:ServerBuilding]]
[[Category:WebServers]]
[[Category:WebServers]]
[[Category:DBServers]]
[[Category:DBServers]]

Revision as of 00:42, 28 January 2022

Proven on:
Logo Debian.png
11 (bullseye)

As always...

Start with:

  • sudo apt update
  • sudo apt upgrade

MySQL on Debian

Debian does not have MySQL in its repositories... :(

We can solve this!

Check the MySQL download page for current version...

If you're happy with 8.0.28, go ahead, download & install.

(Do note: apt update may throw errors if you don't use the latest version.)

  • wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
  • sudo apt install ./mysql-apt-config_0.8.22-1_all.deb

It may ask about distro version. On LMDE 4 or SparkyLinux 5, Select "debian buster" (It won't ask on Debian...)

Select "Ok"

Select "Ok"

Select "Ok"

Some versions will also ask about Configuring mysql-community-server

  • Pick a good root password...
  • I tend to select Use Legacy Authentication Method because Use Strong Password Encryption is annoying as hell. (Your choice here...)

Update & Upgrade everything now...

  • sudo apt update
  • sudo apt upgrade

Now you can go ahead & pretend they haven't dropped MySQL from the Debian repos...

Configure MySQL

  • sudo mysql_secure_installation
    • Would you like to setup VALIDATE PASSWORD component?
      • I select No (because I'd rather manage my own password policies, thanks...)
    • root password
      • Please set the password for root here.
        • Pick a good root password...
    • or... (depends on install...)
      • Using existing password for root.
        • Say No (Which actually means yes... The question being asked is "Change the password for root?")
    • Remove anonymous users?
      • Duh... Yes
    • Disallow root login remotely?
      • Your choice, but I tend to say No.
    • Remove test database and access to it?
      • Duh... Yes again.
    • Reload privilege tables now?
      • Yes
  • (Extra Instructions if you've never configured MySQL before)