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

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

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


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