--- wikisrc/pkgsrc/how_to_install_a_mysql_server.mdwn 2020/09/09 15:50:14 1.4 +++ wikisrc/pkgsrc/how_to_install_a_mysql_server.mdwn 2021/09/04 21:07:52 1.5 @@ -1,41 +1,41 @@ -Installing a MySQL Server is easy. +Installing a MySQL server is easy. -The fastest way is to install the Binary Package. This is only recommended, if you wish to use your server as a stand alone mysql server, without any other server software like a webserver. If you wish to use Apache and PHP please read the article: [[How to install a LAMP Server]]. +The fastest way is to install the binary package. This is only recommended if you wish to use your server as a standalone MySQL server, without any other server software like a web server. If you wish to use Apache and PHP, please read the article: [[How to install a LAMP Server]]. -It has the mysql-client as a dependency, which have to be installed first. +It has the mysql-client as a dependency, which has to be installed first. # pkg_add -v mysql-client # pkg_add -v mysql-server - + If you decide to install via pkgsrc, because of a newer version, just enter: - # cd /usr/pkgsrc/databases/mysql56-server/ + # cd /usr/pkgsrc/databases/mysql57-server/ # make install clean - + It will automatically compile the client and the server. That's it... almost. Now copy the rc.d script into /etc/rc.d/: # cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/ - -and start the MySQL server via the NetBSD's [[!template id=man name="rc.d" section="8"]] framework. Only one modification is needed to [[!template id=man name="rc.conf" section="5"]]: - -# echo "mysqld=yes" >> /etc/rc.conf - +and start the MySQL server via NetBSD's [[!template id=man name="rc.d" section="8"]] framework. Only one modification is needed to [[!template id=man name="rc.conf" section="5"]]: + + + # echo "mysqld=yes" >> /etc/rc.conf + If you want to copy the rc.d scripts automatically with pkgsrc, you can use: - + PKG_RCD_SCRIPTS=YES - + into mk.conf(5). -If mysql is not starting up, you may need to create and set permissions on the /var/mysql directory and setup the default mysql db: +If MySQL is not starting up, you may need to create and set permissions on the /var/mysql directory and set up the default MySQL DB: # mkdir /var/mysql # mysql_install_db @@ -52,4 +52,3 @@ Have fun. ## See also * [[pkgsrc/How_to_install_a_LAMP_Server]] -