PHP Lesson 32 – Connecting to MySQL From PHP

In this lesson I connect to the local MySQL database using the MYSQL_CONNECT function. There are three parameters that I use with this function: servername, username, and password. I also use a conditional statement to print out errors if any occur during the connection.

This video is part of a series on PHP Development. This PHP Development series is designed to teach both current and new programmers web development techniques in a step-by-step guided approach. Any images used are part of the Creative Commons License. For more information visit Lecture Snippets at


Leave a Reply

Your email address will not be published. Required fields are marked *