Mysql install

From wikinotes
Revision as of 22:01, 23 March 2020 by Will (talk | contribs) (Created page with "= Linux = <blockquote> <syntaxhighlight lang="bash"> sudo pacman -S mariadb mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql sudo systemctl enable mariadb...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Linux

sudo pacman -S mariadb
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl enable mariadb
sudo systemctl start  mariadb

## you can then modify the database as the user `root`
## `mysql -u root`

FreeBSD

sudo pkg install mysql57-server
echo "MYSQL_ENABLE=\"YES\"" >> /etc/rc.conf
sudo service mysql-server start