File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / how_to_install_a_mysql_server.mdwn
Revision 1.6: download - view: text, annotated - select for diffs
Sun Sep 5 00:57:14 2021 UTC (2 years ago) by gutteridge
Branches: MAIN
CVS tags: HEAD
Simplify basic installation instructions

    1: Installing a MySQL server is easy. The fastest way is to install the binary package. If you wish to use Apache and PHP, please read the article [[How to install a LAMP Server]]. 
    2: 
    3:     # pkg_add -v mysql-server
    4: 
    5: 
    6: If you decide to install via pkgsrc, because of a newer version, just enter: 
    7:     
    8:     # cd /usr/pkgsrc/databases/mysql57-server/
    9:     # make install clean
   10: 
   11: 
   12: It will automatically compile the client and the server. 
   13: 
   14: That's it... almost. Now copy the rc.d script into /etc/rc.d/: 
   15:     
   16:     # cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/
   17: 
   18: 
   19: 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"]]: 
   20: 
   21: 
   22:     # echo "mysqld=yes" >> /etc/rc.conf
   23: 
   24: 
   25: If you want to copy the rc.d scripts automatically with pkgsrc, you can use: 
   26: 
   27:     PKG_RCD_SCRIPTS=YES 
   28: 
   29: 
   30: into mk.conf(5). 
   31: 
   32: 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: 
   33:     
   34:     # mkdir /var/mysql
   35:     # mysql_install_db
   36:     # chown -R mysql:mysql /var/mysql
   37:     
   38: 
   39: If you need information about the MySQL server package, use the following: 
   40:     
   41:     # pkg_info mysql-server
   42:     
   43: 
   44: Have fun. 
   45: 
   46: ##  See also 
   47: 
   48:   * [[pkgsrc/How_to_install_a_LAMP_Server]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb