SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL executing script file

    Hi

    I have a database dump which has been produced from a third party using phpmyadmin. I need to import this into MySQLi database using MySQL workbench.

    Does anyone know how to do this? I have tried using the Manage Import / Export option but this doesn't work. I have also tried opening the script to execute it but as the file is quite large this just hangs my system.

    Is there a way of just running the script file rather than opening to edit it first?

  2. #2
    SitePoint Member dabaR's Avatar
    Join Date
    Jun 2010
    Location
    Winnipeg, MB, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,

    Do you have access to the command line on the computer where the mysql server is installed?

  3. #3
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,077
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    What errors are you getting when trying to import the database dump via phpmyadmin?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  4. #4
    SitePoint Member
    Join Date
    May 2010
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have access to the command line.

    I am not trying to import using phpmyadmin, as I do not have this installed and am not able to install it. I have MySQL workbench for managing my databases

  5. #5
    SitePoint Member dabaR's Avatar
    Join Date
    Jun 2010
    Location
    Winnipeg, MB, Canada
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there.

    This place shows how to import from the command line. http://answers.google.com/answers/threadview?id=24558 . It is the mysql -u blah -p db_name < mysqldump.sql

    You have to have the DB created by then, and the user indicated with the -u option has to have permissions to create tables, etc.

    Hope that helps!
    --
    Dan Bernardic


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •