### 3. Set Up the Database

Next, we need to set up a database for your site, and to do that, we're going to use the phpMyAdmin tool.

To get to that in your MAMP setup, hit Open WebStart page, and go to Tools > phpMyAdmin. If you're working online and deploying a site then look for phpMyAdmin in your control panel. In cPanel, you'll see it in the databases section.

In phpMyAdmin, the first thing we're going to do is set up a new user. So hit the Users tab at the top and then hit Add User

When you're setting up a live database, you want to try to make all of your user names and passwords very difficult to guess or brute force. So you basically want to use random strings of letters and numbers, but in our case we'll keep things a bit simpler so that it's just a little easier to demonstrate. So we'll set the User name to craftcms. For Host, we'll select Local. And then we'll use the password generator.

Grab the password, and copy and paste it into a notepad somewhere, because you'll be using it in just a moment.

Now we're going to give our user global privileges, so hit the Check All button. Then scroll down and hit the Go button at the bottom of the page. And then you'll see a message on the top saying: "You have added a new user."

#### Create a New Database

Now we need a new database, so over on the left, hit the New link. Then enter the name craftcms again, and hit Create

Now if we look in the Privileges tab, you'll see your new craftcms user that we just created, and this user has all privileges, which means that through this user you'll be able to make the changes that you need to the database that you just set up.

#### Add the Details to Craft's Config File

Now that we have our database and our user, we need to let the Craft CMS know what the details of those two are. So go to craft > config > db.php. There you can fill in the database name, the user name, and the password, following the prompts inside the file.

So now all our files are in place, our database is set up, and we've added the details of our database to Craft's config. We're ready to run the Craft installer.

### 4. Run the Craft Installer

To run the installer, point your browser to the URL localhost:8888/index.php/admin. If you're working online, just replace that local host address with your main domain name.

From here it's just a matter of following the prompts. It's all fairly self-explanatory, except that by default, the site URL is going to be filled in as localhost. But for this to work on your MAMP setup, you need to make sure you have the port number on the end by adding :8888.

And then you can finish up, and just let the installer run. When it's finished, hit Go to Craft CMS, and now your site is installed, and you should see a dashboard page that looks like this:

### Conclusion

So that is how you set up a Craft CMS site. First you carry over the files, then you set up a database, you add your database details into Craft's config, and you run the installer.

## Watch the Full Course

In the full course, Up and Running With Craft CMS, you’ll learn all the most important fundamentals for working with Craft CMS, from installation to customizing the back end and the essentials of templating.

And once you've got to grips with Craft CMS, you can then build on everything you've learned and develop a blog or a landing page from the ground up in my follow-up courses: