Git Product home page Git Product logo

mysql-snap's Introduction

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.

mysql-snap's People

Contributors

downthepark avatar

Stargazers

 avatar Alan Pope avatar

Watchers

 avatar

mysql-snap's Issues

Consider tracks in the snap store

Thanks for making this snap. Nice idea!

Have you considered using the "tracks" functionality to enable multiple different versions of the same snap to be published?

That way, someone could stay on the 8.0 LTS release of MySQL or opt for the newer 8.2 or 8.3 releases.

This could be achieved with separate branches on the git repo and GitHub actions to do the build and push to the store. The snapcrafters repo has some examples of this, like (most recently) the sublime-text snap, which has a "dev" track as well as the "latest" one.

Ability to set initial root password

I need the ability to automate the installation and setup of MySQL as part of a custom Ubuntu Core build. Would it be possible to incorporate some kind of switch to either leave the root password unset or have the ability to set it to a known value?

In my workflow I want to install the MySQL snap and then install my custom app snap which performs a database migration in the post-refresh hook. Since retrieving the password is a manual step this means the installation can't be automated.

For now I am going to create my own version of this snap using the --initialize-insecure flag. I'm happy to contribute if it helps but I'm not sure I understand snaps enough at this stage.

[help please]cannot source a .sql file in snap

this is the error i get when it try to source a .sql file

mysql> source /home/<username>/Downloads/companydb.sql;
ERROR: 
Failed to open file '/home/<username>/Downloads/companydb.sql', error: 13

i tried to find the solution but cant seem to find any

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.