PHP and MySQL Tutorial for Beginners

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. Data on a MySQL is mostly stored in form of tables. It can be very well be used with PHP scripts.

MySQL works on many different system platforms, including AIX, BSDi, FreeBSD, HP-UX, eComStation, i5/OS, IRIX, Linux, Mac OS X, Microsoft Windows, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX, Solaris, Symbian, SunOS, SCO OpenServer, SCO UnixWare, Sanos and Tru64. A port of MySQL to OpenVMS also exists.

Now when it comes to PHP, MySQL finds a easy compatibility. That’s one of the main reason we prefer MySQL with PHP.

As for now in the basic PHP tutorials we haven’t seen any kind of  database to store information. Now in this tutorial I am going to guide you how to set up MySQL database onto your computer.

If you are unaware of WAMP server, well please click to check out our our PHP tutorial that guides you the way installing WAMP server.

Here are some steps you need to do before you integrate PHP with the database of MySQL. Here they are

1)  Launch WAMP server and create a database.

To do this you need to start by clicking the WAMP server icon on task bar which usually appears when you launch the server.

Follow the steps shown in the figure to launch MySQL console screen


2)  Second step is creating a Data base. Creation is done using command.

create database databasename ;

In this case I have created database with a name “tgc”. Therefore the command goes as

create database tgc;

3)  Third step is using the database. Using database is done using command use . Here I use database “tgc” using command:

Use tgc;

 4)  Now you can create tables in the database. I have created table named as “authors”, inserted values into it then displayed it. All the three steps can be viewed on the image.


PHP_AND_MYSQLIn our up coming tutorials I am going to show you how to perform insert operations from the webpage. To be simple how to insert values and display tables from the webpage.