MySQL plugin for asdf version manager.
If you already have a system installation of MySQL or MariaDB, then you will run into issues. MySQL makes some hardcoded assumptions about config file locations, and will not play well with a system install.
There is a --no-defaults
flag for commands listed in the command
help, but for some reason, it's an unknown argument.
- Mac
- Homebrew: used to install the remainder of the dependencies
brew install gcc xz
- Linux
- libtinfo5
- libaio1
asdf plugin-add mysql
asdf list-all mysql
asdf install mysql [VERSION]
asdf global mysql [VERSION]
To set up the initial database in directory DATADIR. It's important that DATADIR is an absolute path
- For 5.x
mysql_install_db --datadir=DATADIR
mysql_secure_installation
- For 8.x+
mysqld --initialize-insecure --datadir=DATADIR
mysql_ssl_rsa_setup --datadir=DATADIR
To run the server: mysqld -D --datadir=DATADIR
- For 8.x+:
mysqld_safe --datadir=DATADIR
Check asdf readme for instructions on how to install & manage versions of MySQL.