Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Book Image

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Overview of this book

Table of Contents (25 chapters)
Mastering phpMyAdmin 2.11 for Effective MySQL Management
Credits
About the Author
About the Reviewers
Preface

Importing SQL Files


Any file containing MySQL statements can be imported via this mechanism. The dialog is available in the Database view or the Table view, via the Import sub-page, or in the Query window.

Note

There is no relation between the currently selected table (here author) and the actual contents of the SQL file that will be imported. All the contents of the SQL file will be imported, and it is these contents that determine which tables or databases are affected. However, if the imported file does not contain any SQL statements to select a database, all statements in the imported file will be executed on the currently selected database.

Let's try an import exercise. First we make sure that we have a current SQL export of the book table (as explained in Chapter 7). This export file must contain the structure and data. Then we drop the book table (Yes, really!). We could also simply rename it. (See Chapter 10 for the procedure.)

Now it is time to import the file back. We should be...