Skip to content

MySQL packaged as a snap, offering improved security over the deb version

License

Notifications You must be signed in to change notification settings

DownThePark/mysql-snap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

MySQL Snap

mysql-strict

Introduction

This is a community-developed MySQL snap, made with the goal to have the ability to run with minimal privileges, while maintaining the ability to run as a stable, full-fledged MySQL server.

Features

  • Strict confinement
  • Rootless daemon
  • Requires manually set MySQL root password
  • Disallows passwordless login via Linux root user
  • Support for multiple CPU architectures

Installation

Get it from the Snap Store

This snap can be installed from the Snap Store using the following command:

sudo snap install mysql-strict

Note

During installation, a randomly generated password is created for the MySQL root user. To retrieve it, issue the following command:

sudo mysql-strict.rootpass

Commands

This snap comes packaged with a number of useful commands:

  • mysql-strict.mysql
  • mysql-strict.mysqladmin
  • mysql-strict.mysqldump
  • mysql-strict.mysqlimport

Tip

For convenience, you can create an an alias for any of these commands using snapd's alias feature. For example:

sudo snap alias mysql-strict.mysql mysql

This way, you can now simply log into the MySQL server with just:

mysql -u root -p

Data

Type Location
Databases /var/snap/mysql-strict/common/data
Logs /var/snap/mysql-strict/current/log
Settings /var/snap/mysql-strict/current/etc
Sockets /var/snap/mysql-strict/current/run

Tip

For creating backups, it is recommended to use snapd's snapshot feature. See here for more details.

About

MySQL packaged as a snap, offering improved security over the deb version

Topics

Resources

License

Stars

Watchers

Forks

Languages