Annotation of wikisrc/pkgsrc/how_to_install_a_mysql_server.mdwn, revision 1.1
1.1 ! mspo 1: Installing a MySQL Server is easy.
! 2:
! 3: 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]].
! 4:
! 5:
! 6: It has the mysql-client as a dependency, which have to be installed first.
! 7:
! 8: # pkg_add -v mysql-client
! 9: # pkg_add -v mysql-server
! 10:
! 11:
! 12: If you decide to install via pkgsrc, because of a newer version, just enter:
! 13:
! 14: # cd /usr/pkgsrc/databases/mysql5-server/
! 15: # make install clean
! 16:
! 17:
! 18: It will automatically compile the client and the server.
! 19:
! 20: That's it... almost. Now copy the rc.d script into /etc/rc.d/:
! 21:
! 22: # cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/
! 23:
! 24:
! 25: and start the MySQL server via the NetBSD's [rc.d(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.d+8+NetBSD-current) framework. Only one modification is needed to [rc.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf+5+NetBSD-current):
! 26:
! 27:
! 28: # echo "mysqld=yes" >> /etc/rc.conf
! 29:
! 30:
! 31: If you want to copy the rc.d scripts automatically with pkgsrc, you can use:
! 32:
! 33: PKG_RCD_SCRIPTS=YES
! 34:
! 35:
! 36: into mk.conf(5).
! 37:
! 38: 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:
! 39:
! 40: # mkdir /var/mysql
! 41: # mysql_install_db
! 42: # chown -R mysql:mysql /var/mysql
! 43:
! 44:
! 45: If you need information about the MySQL server package, use the following:
! 46:
! 47: # pkg_info mysql-server
! 48:
! 49:
! 50: Have fun.
! 51:
! 52: ## See also
! 53:
! 54: * [[pkgsrc/How_to_install_a_LAMP_Server]]
! 55:
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb