From the course: Learning phpMyAdmin
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Importing data from a SQL dump file
From the course: Learning phpMyAdmin
Importing data from a SQL dump file
- The most common way to load data into MySQL is by using an SQL file, which is basically a text file containing a series of SQL queries. In the exercise files in the Chapter 4, 04_03 folder, is a file called cars.sql . Let's take a look inside this file. I'm going to open it in brackets with any text editor will do. This contains all the necessary commands to define an individual table and populate it with data. But the technique that this uses is exactly the same for loading data into multiple tables, a whole database, or even into multiple databases. In effect, it's the way that you transfer data from one server to another or to restore a database from a backup. Each line that begins with a double dash is a comment, so at the top it's saying it's a phpMyAdmin SQL Dump, the version that was used to create it when it was created, and so on. And if we scroll down a little bit, on line 20 it says Database: `up_and_running` but this is also a comment, so that means that although it was…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Importing data from Excel or a CSV file8m 12s
-
Importing data from an OpenDocument Spreadsheet7m 25s
-
Importing data from a SQL dump file5m 6s
-
Exporting a database the quick way4m 8s
-
Exporting multiple databases6m 13s
-
Creating a custom export for a single database8m 47s
-
Exporting partial data5m 47s
-
Enhanced export features in phpMyAdmin 4.55m 28s
-
-
-
-
-
-