Setting Up Your Database
Get your credentials
Setting up your database can be an easy task, or a hard one. This process will vary from host to host. If you want to install it yourself on your computer, please refer to installation manuals provided. If you are using a WAMP, LAMP, or MAMP stack, then with that installation, MySQL is already set up. You will need three things with your database -
- Username
- Password
- Host
If you are on a local machine running a stack, usually by default the host is ‘localhost’, the username is ‘root’, and the password is blank. If you changed these settings during installation, then they will be what you chose them to be. If you are using a webhost, please refer to their support to grab these credentials. If you are on a live webserver that can be accessed by other people (even if they are not aware of the domain) – DO NOT ALLOW NO PASSWORD ACCESS Most hosting companies won’t even give you root access, nor allow no password, but incase you are setting up your own server, do not have a blank password.
Check
Check to make sure you do have the credentials to log in. If you are running a WAMP, LAMP, or MAMP stack, you already have PHPMyAdmin. This is located at http://localhost/phpmyadmin. (MAMP uses :8080 I believe). Load up phpmyadmin in your browser and try logging in. If you are successful, then we are good to go. If you are getting errors, please refer to the error you get, and the links it will provide for you to check out why you are getting those errors.
What’s next?
In the next tutorial, we will begin creating a table, and starting to learn the syntax to write SQL. After that, we will connect to our databases via PHP – learning the functions as well.







