Any web site that uses server-side language requires a server to run. If you're building a website that uses even the simplest of databases, then you're using a server-side language. It's simply code that's run through a server-side before being transmitted to website users (When a user makes a request, the server will respond by providing the desired information).
There are two server environments to choose from: local and remote. A local server is, as you might have guessed, hosted locally on your own computer while a remote server is hosted elsewhere. It might be a paid hosting plan, another computer on a local area network, or even a free hosting plan; regardless, a remote server is a server that is not on your computer.
XAMPP is an abbreviation where X stands for Cross-Platform, A stands for Apache, M stands for MYSQL, and the Ps stand for PHP and Perl, respectively. It is an open-source package of web solutions that includes Apache distribution for many servers and command-line executables along with modules such as Apache server, MariaDB, PHP, and Perl.
Before publishing a website to the live server, XAMPP allows developer to test website on computers and laptops by creating a local host or a local server. It is a platform that provides a suitable environment for testing and verifying the functionality of projects based on Apache, Perl, MySQL, and PHP using the host's system. Perl is a web development programming language, PHP is a backend scripting language, and MariaDB is MySQL's most widely used database.
As you may have guessed, we'll be using XAMPP to run our sql commands when interacting with databases using sql queries.
If xampp is not already installed on your computer, download it and install it.
After installing XAMPP, open it and select the first two start buttons in the octions menu to start Apache and MySQL.
If you just launched Apache and MySQL, you should see something like this:
XAMPP is now ready to use! You now have two choices: either one or both of them. Do you have any idea what those possibilities are? Let me tell you something:
Which of these options do you have?
Type localhost into your browser. and then enter, then click phpMyAdmin on the newly opened web page. You can also type localhost/phpmyadmin and get there directly. If you are inside you can click SQL menu to start writing SQL commands.
You can handle your databases much more easily with phpMyAdmin, but you can use CMD for learning purposes when taking this course.
Your MySQL binaries should be somewhere under your XAMPP folder. Look for a /bin folder, and you'll find the mysql.exe client around. Let's assume it is in c:\xampp\mysql\bin, then you should fireup a command prompt in this folder.
That means, start "cmd", and type:
What you will see:
Let's look at an example of how to use this command to display a database: show databases;
Now you're ready to create databases, tables, and anything else database-related because you know where to type the commands.
Let's begin with SQL commands syntax.
Next