I am a new FreeBSD version 6.x/7.x/8.x/9.x/10.x server user. How do I start / stop or restart MySQL server from a shell prompt over ssh session?
First login as the root user. Next make sure MySQL service is enabled. Just open /etc/rc.conf file using vi text editor:
# vi /etc/rc.conf
Append / modify following line to start MySQL service:
mysql_enable="YES"
Save and close the file.
Task: Start MySQL server on FreeBSD
Type the following command:
# /usr/local/etc/rc.d/mysql-server start
Task: Stop MySQL server on FreeBSD
Type the following command:
# /usr/local/etc/rc.d/mysql-server stop
Task: Restart MySQL server on FreeBSD
Type the following command:
# /usr/local/etc/rc.d/mysql-server stop && /usr/local/etc/rc.d/mysql-server start
(adsbygoogle = window.adsbygoogle || []).push({});