Menu

Importing *.sql setup files

Support
2001-08-10
2003-08-17
  • Nobody/Anonymous

    Please forgive me for asking this, but how do you import these *.sql files at the MySql Shell> prompt?  I am talking about step number 3 in the setup process.

    3. Then exec: mysql mytest < ./API/Auth/autg.sql
                  mysql mytest < ./Modules/Categories/categories.sql
                  mysql mytest < ./Modules/Links/links.sql
                  mysql mytest < ./Modules/Shopcart/shopcart.sql

    I've created the 'mytest' database and I know that these pre-written *.sql text files will auto-create my tables in the 'mysql' database, but my question is; What is the correct "MySql" command to do so at the shell> MySql must know were the *.sql files are. Should I place all of 3 *.sql files into the 'mytest' database ./directory and execute the proper MySql command then?

    Is it possible to use the command syntax located here and are the *.sql files considered to be "text" file forma?: 

    http://www.mysql.com/doc/m/y/mysqlimport.html

    Thanks to whom ever answers. I'm kinda new to sql but I'm learning very fast. You may also email me at vynum@vynumX.com  (note: please remove the 'X' in the email address to send email)

     
    • Dzmitry Haiduchonak

      Should I place all of 3 *.sql files into the 'mytest' database ./directory and execute the proper MySql command then?

      Yes, of course. Full MySQL syntax is:
      mysql db_name < file_name.sql

       
    • Nobody/Anonymous

      You guys should think about creating an auto installer for the SQL files. It always makes it easier for the people who have no clue what they are.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.