Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
To be honest, you don't need to watch this video to create a great data-driven web site. In fact, we won't look at Core Drupal at all. We're going to dig below Drupal, into the database it uses to store all your site's data and settings. I'm going to do this because sometimes, not often, mind you, but sometimes it's most convenient to grab a quick and dirty export directly from the database. And even if you never have to do that, it's instructive to see how Drupal works with data behind the scenes. So let's take a look. We're running Acquia Dev Desktop which has a button on it that lets us manage our database.
If you're using Drupal on a web host, there's a good chance that they also use phpMyAdmin, the same program that Acquia Dev Desktop does. So while the interface you see might not be exactly the same, the same concepts should be true for you. phpMyAdmin can store multiple databases. The one that we're using is called twotrees. You might remember that from when we installed the site in the first place. You can click on twotrees to see a list of tables, or if you prefer, go back to the front page and click on this Databases link.
Here you have some additional options. But in either case, it leads to the same place. As we scroll through these tables, some of the names will look familiar to you. For example, field_data_field_first_name. As you might guess, when I click that, it shows us all of the data that goes with the first name field that we put into our web site. We can further look at any individual row by clicking this little Pencil icon, although to be honest, now we're digging very, very deeply into the database itself.
So I'm just going to go back to our first_name table. If you want to export this, you click the Export tab up here. Then you have a lot of different options. I'll simply scroll to the bottom. I'll simply scroll to the bottom, And instead of saving it as a file, I'm going to show you what it looks like on the screen. I click Go and there it is. These are the instructions to the database program on how to recreate the database that's behind your Drupal web site. And there are all the values. So that's how you can get data out of a Drupal site, even if you don't have Drupal running.
That also shows why it's not enough simply to secure Drupal if you want to keep your data safe; you also have to make the database secure. lynda.com has a few MySQL courses that can help you with that. And for immediate help, scroll back up to the top and click this little Help balloon. I find phpMyAdmin to be extremely useful, and in fact, that's how I created the exercise files for this course. If you'd like to learn how to import those exercise files, see the video "Using the exercise files." I want to mention one other method of getting your database in and out of Drupal; however, this requires that you already have Drupal running.
To show it, I'll go to my site where I've already installed the module called Backup and Migrate. You can get it from drupal.org/project/backup_migrate. But I'll just go back to my site where I have it installed. You click Configuration, and Backup and Migrate. This is a different view of the same information. If we click the advanced backup page, you'll see that in fact we can select which tables to include in our backup and which ones to exclude. Very often people will exclude the caches because it's a lot of stuff that's only held temporarily and can really bloat your database quite a bit.
Again, you might never need the information from this video, but the fact is, Drupal doesn't exist in a vacuum. You often need to make it work with non- native data sources, or you have to get data in or out using the SQL language. I can't teach you that. Again, it's a very big subject, and there are other lynda.com courses that do. But knowing just a little about the backend database can speed up your work and get you out of a lot of trouble.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 96915 Viewers
56 Video lessons · 110600 Viewers
71 Video lessons · 79431 Viewers
131 Video lessons · 38109 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.