Welcome to Centmin Mod Community
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

    110
    9
    18
    Jul 18, 2014
    Ratings:
    +13
    Local Time:
    12:14 PM
    • 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
    http://i.imgur.com/SVxU1hJ.png
    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

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    5:14 AM
    1.13.x
    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

    29,033
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    7:14 PM
    Nginx 1.13.x
    MariaDB 5.5
    If you want db imported into new db name use myysql import Jimmy's way