MySQL export/import

Discussion in 'MySQL' started by sasamsa, Feb 15, 2006.

  1. #1
    I have some problems importing local database to server.
    I have joomla running on localhost with wamp sql version MySQL 5.0.18-nt and on server MySQL 4.0.25-standard.
    How do I export from localhost to server?
    both have phpMyAdmin 2.7.0-pl2
    When I export with default settings ant try to import to server it says:
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=3' at line 19

    When I set MySQL compatibility to MYSQL40, export and try to import it says:
    #1046 - No Database Selected

    What to do?
     
    sasamsa, Feb 15, 2006 IP
  2. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Insert a line in the beginning of your sql-sqript saying:

    use database_name;

    where database_name is the name of your database. that should take care of the #1046 error.
     
    Perrow, Feb 15, 2006 IP
    sasamsa likes this.
  3. sasamsa

    sasamsa Peon

    Messages:
    63
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, that worked. Thank you very much
     
    sasamsa, Feb 15, 2006 IP