From Sean Lawlor's Wiki
Jump to: navigation, search

MySQL Database Server Setup

This is a guide to setting up a MySQL database server in a LXC container.

LXC Container Configuration

After you have the container created and the appropriate network interface configured, you need to make sure that the UDP/TCP ports are allowed through your firewall so clients can send queries to the DNS server.

  1. Install mysql and the necessary sub-components
    • apt-get install nano nmap mysql dnsutils
    • This will also install the mysql client
  2. During the install you will need to create a database root user and password
  3. Navigate to /etc/mysql
  4. Edit my.cnf with nano my.cnf
    • In order to accept all connections via IPv6 and IPv4 edit the line labelled bind-address and set it to
      # Instead of skip-networking the default is now to listen only on
      # localhost which is more compatible and is not less secure.
      bind-address            = ::
  5. Restart the MySQL database server with service mysql restart