Annotation of wikisrc/pkgsrc/how_to_install_a_mysql_server.mdwn, revision 1.5
1.5 ! gutterid 1: Installing a MySQL server is easy.
1.2 schmonz 2:
1.5 ! gutterid 3: 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]].
1.2 schmonz 4:
5:
1.5 ! gutterid 6: It has the mysql-client as a dependency, which has to be installed first.
1.2 schmonz 7:
8: # pkg_add -v mysql-client
9: # pkg_add -v mysql-server
1.5 ! gutterid 10:
1.2 schmonz 11:
12: If you decide to install via pkgsrc, because of a newer version, just enter:
13:
1.5 ! gutterid 14: # cd /usr/pkgsrc/databases/mysql57-server/
1.2 schmonz 15: # make install clean
1.5 ! gutterid 16:
1.2 schmonz 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:
1.5 ! gutterid 25: 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"]]:
! 26:
! 27:
! 28: # echo "mysqld=yes" >> /etc/rc.conf
! 29:
1.2 schmonz 30:
31: If you want to copy the rc.d scripts automatically with pkgsrc, you can use:
1.5 ! gutterid 32:
1.2 schmonz 33: PKG_RCD_SCRIPTS=YES
1.5 ! gutterid 34:
1.2 schmonz 35:
36: into mk.conf(5).
37:
1.5 ! gutterid 38: 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:
1.2 schmonz 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]]
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb