SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    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
    Location
    Toronto, Canada
    Posts
    39,273
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    i don't do command line stuff, but i believe it's as simple as pointing to the .sql file --
    Code:
    shell> mysql db_name < script.sql
    rudy.ca | @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
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Off Topic:

    Thread moved to appropriate forum.


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
  •