Mysql Setup on Antix Linux
This guide will walk you through setting up MySql on Antix linux runinit system. Reference
Installation
-
Adding the MySQL Apt Repository
download the MySQL APT Repo. Then install the package with dpkg
Terminal window sudo dpkg -i ~/Downloads/mysql-apt-config_0.8.34-1_all.debselect
OK
when it prompts you to go with the default options -
Install MySQL Toolchain
Terminal window sudo apt updatesudo apt install mysql-serverthen set a password for the root user for MySQL when it asks
-
Create a Service for your
Init System
sudo mkdir -p /etc/sv/mysqlsudo tee /etc/sv/mysql/run > /dev/null <<'EOF'#!/bin/shexec chpst -u mysql /usr/sbin/mysqldEOFsudo chmod +x /etc/sv/mysql/runsudo ln -s /etc/sv/mysql /var/service/Now runit will detect and manage MySQL service
Terminal window // TODO: Need to complete this code snippetNow runit will detect and manage MySQL service
-
Test if Eveything worked
Terminal window mysql -u root -p
Change Root Password (Optional)
-
Open mysql shell
Terminal window sudo mysql -
run command to change Password
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourPasswordHere';FLUSH PRIVILEGES;EXIT;
Common Problem
when running $: mysql -u root -p
if you get
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sudo mkdir -p /var/run/mysqldsudo chown mysql:mysql /var/run/mysqld