Database MySQL

What is a database?

This is a place to store data, it consists of tables and is used for all applications and websites which saves data online like Google, Facebook and so on.

What are SQL and MYSQL?

SQL stands for Structured Query Language and its a database langue, it’s a syntax which can communicate with our database.

MYSQL is a database system there use SQL syntax.

How to Connect to MYSQL database?

In order to try this you can download MAMP and do it local first so you have an idea on how to do this, if you are interested I made a guide for MAMP here.

You need to go to PHPMyAdmin interface if you are using MAMP you can do this here http://localhost/phpMyAdmin/?lang=en.

Then just click on new and then give the database a name and then click create. Now you have created a database.

Then you need to open you php file and write

$mysqli = mysqli_connect ($host, $user, $password, $database)
if (mysqli_connect_errno())
echo “Connection Failed”
echo “Connection Succes”




Related Guides