Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Setting Up a Database for Drupal3:23 with Diane Douglas
Here we begin our Drupal site by setting up a Database using PHPMyAdmin.
http://localhost:8888/MAMP/ and under the "Tools" menu, select "phpMyAdmin".
- Click the "Databases" tab.
- Enter a name for the database.
- Select "utf8_general_ci" under the "Collation" drop-down.
- Click the "Create" button.
- Click on the name of the new database we just created.
- Select "Privileges" tab.
- Click "Add user".
- Enter a username into the "User name" field.
- In the "Host" field, select "Local".
- Enter a password and retype it. Leave the "Password generate" field blank.
- Under the "Database for User" section, select only "Grant all privileges on database yourdatabasename".
- Click the "Go" button in the lower right.
Don't forget to save the name of the database, as well as the username and password.
Drupal Core setup:
Download the Drupal Core folder, and then rename the downloaded folder for your project.
In Terminal, 'cd' to your project directory and then run these two commands:
cp sites/default/default.settings.php sites/default/settings.php
chmod -R a+w sites/default
- Set your server's document root to your project directory and navigate to
http://localhost:8888/to follow the Drupal installation instructions.
- Select the "Standard" install, click "Save and Continue".
- Select "English" as the language, click "Save and Continue".
- Under the "Set up databases" tab, select "MySQL, MariaDB, or equivalent" and then fill in your database name, and the username and password you just created in phpMyAdmin. Then click "Save and Continue". This links your Drupal site to its database - this is not the account you will use to login and administer your site.
- Under the "Configure site" tab, pick a site name (like "My First Drupal Site") and enter your email address.
- Enter details to create a site maintenance account, and make sure to save this Drupal username and password too with your database username and password.. This is the account you will use to log in and administer your Drupal site, and it is a pain to change the username and password later.
- At the bottom select the country and timezone. Then click "Save and Continue".
Since so many parts of a Drupal website are stored in a database,
we need to create a database for Drupal to use.
We also need to create a database user, with a password, and
give that user privileges, which allow editing the database.
Remember how I said to think of the database like your garage?
The database user that we are creating is like the person who is going to actually
organize your stuff and physically put it on the shelves in the garage.
Except that it isn't a real person, instead Drupal will use the username and
password to act access the database, so
that it can automatically store all of your content and configuration.
For Mac users we will make sure that MAMP server is running, and
then click on Open Webstart page.
This will take us back to the MAMP startup page.
Where we can go to the Tools menu, and then select phpMyAdmin.
This is a tool which allows us to create our database, as well as create a user,
with the privileges to modify it.
Windows users can get to phpMyAdmin by left-clicking on the WAMP icon
in the System Tray and then selecting phpMyAdmin.
Now that we're in phpMyAdmin, click the Databases tab.
Enter a name for the database we're making, where it says create database.
We'll call ours cameron_database.
Next we must select a collation from this dropdown menu.
The official Drupal installation guide tells us
to select one called utf8_general_ci.
Don't worry too much about what this means.
Essentially, it is the format that Drupal uses to store your content.
You can find it near the bottom here, UTF8_general_CI.
Then click the Create button.
Now we can click on the name of the new database that we just created, and
then select the Privileges tab.
Click Add User, and then enter a username into the username field at the top.
We'll call this one database_admin.
In the Host field, select Local.
Then enter a password, and retype it on the next line.
We're going to use treehouse.
You can leave the password generate field here blank.
Then under Database for user,
select Grant all privileges on database, whatever your database is named.
Finally we can click on Go in the lower right corner of the screen.
Lastly we will write down the name of our database, as well as the username and
password we just created, so we won't lose it.
Next we are going to install Drupal.
You need to sign up for Treehouse in order to download course files.Sign up