SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2011
    0 Post(s)
    0 Thread(s)

    How do I import .sql creates and loads directly into MySql engine?

    I am doing a project for school and we need to create a html website using PHP to communicate with a relational database (MySQL) and host it online. It is a website project that has to make use of a relational database. So far I am creating it with Apache + PHP + MySQL + basic html on my own local machine WinXP localhost and it works out..

    The steps in the book demonstrate on how to create a database and table manually. But I have a bunch of .sql creates/loads/and inserts in .sql (text) format read to go and don't want to manually type all that in from the command line. How can I bulk import all this directly into my MySQL engine so I can move on and start with the html/php stuff? I figured out how to use the workbench to draw the ERD models, but it exports into a bunch of .sql code/text and I still have to find a way to actually insert it into the InnoDB.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Toronto, Canada
    58 Post(s)
    3 Thread(s)
    i don't do command line stuff, but i believe it's as simple as pointing to the .sql file --
    shell> mysql db_name < script.sql | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    448 Post(s)
    8 Thread(s)
    Off Topic:

    Thread moved to appropriate forum.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


Posting Permissions

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