[SOLVED] ERROR 1049 (42000): Unknown database

Discussion in 'Installation/Configuration' started by conductive, Jun 27, 2017.

  1. conductive

    conductive Member

    My host is shutting down so I had to migrate from a wheezy Ispconfig 3.1.4 NGINX server to a to a new server.
    I used this for a guide
    https://www.howtoforge.com/tutorial/perfect-server-debian-jessie-nginx-bind-dovecot-ispconfig-3.1/3/
    with some help from
    https://www.howtoforge.com/tutorial...-stretch-apache-bind-dovecot-ispconfig-3-1/3/
    I built a Debian 9.0 NGINX server. Substituting PHP5 for PHP7 everything seemed to go quite smoothly.

    Unfortunately I have run into a snag restoring my databases. The Ispconfig database installed with out a problem.
    I backed up my databases as follows:
    mysql -h localhost -u root -pPASSWORD mydatabase < mydatabase.sql
    I then tested restoring this file on the old file on the old server with out any problem.
    mysql -h localhost -u root -pPASSWORD mydatabase < mydatabase.sql

    When I attempted to do restore the exact same file the exact same way on the New server I received the following error.
    ERROR 1049 (42000): Unknown database 'mydatabase'

    What is happening and/or how do I fix this?
     
  2. conductive

    conductive Member

    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.1.4


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 7.0.19-1

    ##### PORT CHECK #####

    [WARN] Port 443 (Webserver SSL) seems NOT to be listening

    ##### MAIL SERVER CHECK #####


    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Unknown process (nginx:) (PID 14738)
    [INFO] I found the following mail server(s):
    Postfix (PID 9530)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 9581)
    [INFO] I found the following imap server(s):
    Dovecot (PID 9581)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 735)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [localhost]:10026 (9561/amavisd-new)
    [localhost]:10027 (9530/master)
    [anywhere]:587 (9530/master)
    [localhost]:11211 (13540/memcached)
    [anywhere]:110 (9581/dovecot)
    [anywhere]:143 (9581/dovecot)
    [anywhere]:80 (14738/nginx:)
    [anywhere]:8080 (14738/nginx:)
    [anywhere]:8081 (14738/nginx:)
    [anywhere]:465 (9530/master)
    [anywhere]:21 (735/pure-ftpd)
    ***.***.***.***:53 (9656/named)
    [localhost]:53 (9656/named)
    [anywhere]:22 (1137/sshd)
    [localhost]:631 (13257/cupsd)
    [localhost]:953 (9656/named)
    [anywhere]:25 (9530/master)
    [anywhere]:993 (9581/dovecot)
    [anywhere]:995 (9581/dovecot)
    [localhost]:10023 (26776/postgrey)
    [localhost]:10024 (9561/amavisd-new)
    [localhost]:10025 (9530/master)
    *:*:*:*::*:10026 (9561/amavisd-new)
    *:*:*:*::*:3306 (9303/mysqld)
    *:*:*:*::*:587 (9530/master)
    [localhost]10 (9581/dovecot)
    [localhost]43 (9581/dovecot)
    *:*:*:*::*:80 (14738/nginx:)
    *:*:*:*::*:8080 (14738/nginx:)
    *:*:*:*::*:8081 (14738/nginx:)
    *:*:*:*::*:465 (9530/master)
    *:*:*:*::*:21 (735/pure-ftpd)
    *:*:*:*::*:53 (9656/named)
    *:*:*:*::*:22 (1137/sshd)
    *:*:*:*::*:631 (13257/cupsd)
    *:*:*:*::*:953 (9656/named)
    *:*:*:*::*:25 (9530/master)
    *:*:*:*::*:993 (9581/dovecot)
    *:*:*:*::*:995 (9581/dovecot)
    *:*:*:*::*:10023 (26776/postgrey)
    *:*:*:*::*:10024 (9561/amavisd-new)




    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    f2b-postfix-sasl tcp -- [anywhere]/0 [anywhere]/0 multiport dports 25
    f2b-dovecot tcp -- [anywhere]/0 [anywhere]/0 multiport dports 110,995,143,993,587,465,4190
    f2b-pure-ftpd tcp -- [anywhere]/0 [anywhere]/0 multiport dports 21
    f2b-sshd tcp -- [anywhere]/0 [anywhere]/0 multiport dports 22
    ufw-before-logging-input all -- [anywhere]/0 [anywhere]/0
    ufw-before-input all -- [anywhere]/0 [anywhere]/0
    ufw-after-input all -- [anywhere]/0 [anywhere]/0
    ufw-after-logging-input all -- [anywhere]/0 [anywhere]/0
    ufw-reject-input all -- [anywhere]/0 [anywhere]/0
    ufw-track-input all -- [anywhere]/0 [anywhere]/0

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    ufw-before-logging-forward all -- [anywhere]/0 [anywhere]/0
    ufw-before-forward all -- [anywhere]/0 [anywhere]/0
    ufw-after-forward all -- [anywhere]/0 [anywhere]/0
    ufw-after-logging-forward all -- [anywhere]/0 [anywhere]/0
    ufw-reject-forward all -- [anywhere]/0 [anywhere]/0
    ufw-track-forward all -- [anywhere]/0 [anywhere]/0

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ufw-before-logging-output all -- [anywhere]/0 [anywhere]/0
    ufw-before-output all -- [anywhere]/0 [anywhere]/0
    ufw-after-output all -- [anywhere]/0 [anywhere]/0
    ufw-after-logging-output all -- [anywhere]/0 [anywhere]/0
    ufw-reject-output all -- [anywhere]/0 [anywhere]/0
    ufw-track-output all -- [anywhere]/0 [anywhere]/0

    Chain f2b-dovecot (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-postfix-sasl (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-pure-ftpd (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-sshd (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain ufw-after-forward (1 references)
    target prot opt source destination

    Chain ufw-after-input (1 references)
    target prot opt source destination

    Chain ufw-after-logging-forward (1 references)
    target prot opt source destination

    Chain ufw-after-logging-input (1 references)
    target prot opt source destination

    Chain ufw-after-logging-output (1 references)
    target prot opt source destination

    Chain ufw-after-output (1 references)
    target prot opt source destination

    Chain ufw-before-forward (1 references)
    target prot opt source destination

    Chain ufw-before-input (1 references)
    target prot opt source destination

    Chain ufw-before-logging-forward (1 references)
    target prot opt source destination

    Chain ufw-before-logging-input (1 references)
    target prot opt source destination

    Chain ufw-before-logging-output (1 references)
    target prot opt source destination

    Chain ufw-before-output (1 references)
    target prot opt source destination

    Chain ufw-reject-forward (1 references)
    target prot opt source destination

    Chain ufw-reject-input (1 references)
    target prot opt source destination

    Chain ufw-reject-output (1 references)
    target prot opt source destination

    Chain ufw-track-forward (1 references)
    target prot opt source destination

    Chain ufw-track-input (1 references)
    target prot opt source destination

    Chain ufw-track-output (1 references)
    target prot opt source destination
    ====================================================================
    tcp 0 0 *:mysql *:* LISTEN 6377/mysqld
    tcp 0 0 localhost:mysql localhost:35402 ESTABLISHED 6377/mysqld
    tcp 0 0 localhost:mysql localhost:35406 ESTABLISHED 6377/mysqld
     
    Last edited: Jun 27, 2017
  3. conductive

    conductive Member

    Problem Solved.

    Databases must be created first
     

Share This Page