Difference between revisions of "MySQL"
|Line 14:||Line 14:|
=== User ===
=== User ===
MySQL requires the mysql user and group to exist prior to successful installation. Create them before
MySQL requires the mysql user and group to exist prior to successful installation. Create them before mysql via ports.
Revision as of 18:04, 10 July 2011
MySQL installation through the ports system requires cmake and libaio to be installed first, or else installing MySQL will not complete. libaio requires cmake as well, so be sure to install cmake first.
# cd /usr/ports/opt/cmake # pkgmk -d -i
# cd /usr/ports/opt/libaio # pkgmk -d -i
MySQL requires the mysql user and group to exist prior to successful installation. Create them before installing mysql via ports.
# getent group mysql || /usr/sbin/groupadd -g 46 mysql # getent passwd mysql || /usr/sbin/useradd -g mysql -u 46 -d /var/lib/mysql -s /bin/false mysql # /usr/bin/passwd -l mysql
Installing from ports
# cd /usr/ports/opt/mysql # pkgmk -d -i # mysql_install_db --user=mysql
Auto-starting mysqld on boot
- Edit the startup services config file: vi /etc/rc.conf
- Append mysqld at the end of the start-up services list.
- Save and quit with :wq
- reboot and confirm mysqld in running processes.