Diff for /wikisrc/pkgsrc/how_to_install_a_mysql_server.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:28:27 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 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 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]]. 
   
   
 It has the mysql-client as a dependency, which have to be installed first.  It has the mysql-client as a dependency, which have to be installed first. 
          
     # pkg_add -v mysql-client      # pkg_add -v mysql-client
     # pkg_add -v mysql-server      # pkg_add -v mysql-server
          
   
 If you decide to install via pkgsrc, because of a newer version, just enter:  If you decide to install via pkgsrc, because of a newer version, just enter: 
          
     # cd /usr/pkgsrc/databases/mysql5-server/      # cd /usr/pkgsrc/databases/mysql5-server/
     # make install clean      # make install clean
          
   
 It will automatically compile the client and the server.  It will automatically compile the client and the server. 
   
 That's it... almost. Now copy the rc.d script into /etc/rc.d/:  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/      # cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/
          
   
 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):  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): 
          
   
 # echo "mysqld=yes" >> /etc/rc.conf  # echo "mysqld=yes" >> /etc/rc.conf
          
   
 If you want to copy the rc.d scripts automatically with pkgsrc, you can use:  If you want to copy the rc.d scripts automatically with pkgsrc, you can use: 
          
     PKG_RCD_SCRIPTS=YES      PKG_RCD_SCRIPTS=YES 
          
   
 into mk.conf(5).  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 setup the default mysql db: 
          
     # mkdir /var/mysql      # mkdir /var/mysql
     # mysql_install_db      # mysql_install_db
     # chown -R mysql:mysql /var/mysql      # chown -R mysql:mysql /var/mysql
          
   
 If you need information about the MySQL server package, use the following:  If you need information about the MySQL server package, use the following: 
          
     # pkg_info mysql-server      # pkg_info mysql-server
          
   
 Have fun.  Have fun. 
   
 ##  See also  ##  See also 
   
   * [[pkgsrc/How_to_install_a_LAMP_Server]]    * [[pkgsrc/How_to_install_a_LAMP_Server]]
   

Removed from v.1.1  
changed lines
  Added in v.1.2


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