Home >Database >Mysql Tutorial >Install MySQL on FreeBSD

Install MySQL on FreeBSD

王林
王林forward
2023-09-13 17:17:02826browse

在 FreeBSD 上安装 MySQL

#MySQL can be installed on FreeBSD using the binary distribution provided by Oracle. The first and easiest way to install MySQL is to use the "mysql-server" and "mysql-client" ports available on the http://www.freebsd.org/ website.

The advantages of using these ports are -

  • It comes with a working MySQL server and contains all the optimizations enabled and helpful on the user's version of FreeBSD Go to work.

  • It is automatically configured and built.

  • The startup script is installed in /usr/local/etc/rc. d.

  • It enables users to see which files are installed using pkg_info –L.

  • It also enables users to delete MySQL using pkg_delete if it is no longer needed on the computer.

The process of building MySQL requires GNU make (gmake) to work properly. If GNU make is not available, you must install it before compiling MySQL.

You can use the following command to install the ports system -

# cd /usr/ports/databases/mysql80−server
# make
...
# cd /usr/ports/databases/mysql80−client
# make

The standard port installation will place the server in /usr/local/libexec/mysqld, and the startup script of the MySQL server will be placed in /usr/local/ etc/rc.d/mysql-server.

MySQL server can be installed using the port system using the following code:

Example

# cd /usr/ports/databases/mysql80-server
# make deinstall
...
# cd /usr/ports/databases/mysql80-client
# make deinstall

The above is the detailed content of Install MySQL on FreeBSD. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete