Discover Centmin Mod today
Register Now

MariaDB potential problem while importing database

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by hitman, Feb 8, 2017.

  1. hitman

    hitman Member

    Jul 18, 2014
    Local Time:
    7:02 AM
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed: 1.11.9
    • PHP Version Installed: 5.6.30
    • MariaDB MySQL Version Installed: 10.1.21

    well this is a fresh install on a new server and this is kind of weird
    i am transfering 2 sites to the new server and i have set up mysql users and databases and now i am trying to import the databases
    i first "use" the database, and then "source" from the sql file
    here is the screenshot

    problem is that after the first rows it says "database changed"
    many rows are affected and at the end the imported database does not have the name of the database i used with "use databasename" but it has the name it used to in the old server

    anyone care to explaing what is happening cause i find it a bit strange
    please note that the sites seem to be working fine
  2. Jimmy

    Jimmy Premium Member Premium Member

    Oct 24, 2015
    East Coast USA
    Local Time:
    12:02 AM
    MariaDB 10.1.x
    I use this and it works great for me:

    Restore MySQL Database (RESTORE)
    # mysql -u <username> -p <database> < /path/to/<database>_backup_date.sql
    • Agree Agree x 2
  3. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    3:02 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    If you want db imported into new db name use myysql import Jimmy's way