
an empty string, ”), or ‘root’, by default.

Make sure you set the password value to the password you set for the MySQL root user back when you installed WAMP/MAMP in Lesson 2 , which, again, is most likely either blank (i.e.

In order to connect our app to the database we created previously, update those four options with the values shown below. They tell our app: what computer/server the database is located on (hostname) what username to connect to the database with the password associated with that username and the name of the database. The options above-hostname, username, password, and database-are the ones we’re concerned with. If you open up that file, you’ll notice some, mostly empty, database configuration options at the bottom, as seen here. The CI database configurationĪs with other configuration files you’ve seen previously, the database configuration file is also stored in, you guessed it, the application/config directory at application/config/database.php.
#CONFIGURING SEQUEL PRO AND CODE IGNITER HOW TO#
It’s time for this app to start using some real data!Īs I mentioned previously, CI has great built-in support for interacting with a database, but we still need to tell it how to access our database so they can begin to communicate. We need to hook it up to our app so we can start utilizing it.

We now have a database to store our data, which is great, but it’s currently just sitting out there in space without any outside contact. This is lesson seven of a 10 ten-lesson course, Simple CodeIgniter App, which walks you through the creation of your first PHP web application using the CodeIgniter framework. By Alex Coleman | Build a Simple CodeIgniter App, CodeIgniter, Web App, Web Development
