Xampp Use Mysql

These instructions are for installing XAMPP 1.7.3 on Windows XP, Service Pack 3. It should work for other configurations as well.

XAMPP 1.7.4 (released in January 2011). I had no problem with the install and most things work just fine, however, there are many little things that require “expert” tinkering to get it working right. Because of this, I cannot recommend it to someone just looking for a straightforward install with minimal tinkering. See also this discussion thread at Apache Friends which covers in more detail the various issues.

XAMPP 1.7.7 (released in Septemeber 2011) is the latest version. I had no problem with the install and most things work just fine, however, there are many little things that require “expert” tinkering to get it working right (it is much stricter on PHP errors than 1.7.3 is – a flag change to fix that). Because of this, I cannot recommend it to someone just looking for a straightforward install with minimal tinkering. It has a new phpmyadmin interface (unfortunately, it defaults to German – easily changed, though). It still exludes the port checker present in version 1.7.3 (which is a really useful debug tool).

If you are determined to install XAMPP 1.7.4 or 1.7.7 and you are more of a user than a developer, you will want to check out this article on preventing the PHP interpreter from spitting out error messages related to poor programming practice (yes, even popular packages can be filled with poor programming practices) and deprecated features.

NOTE: If you are just looking for a way to install and test various web applications. A simpler alternative might be to install AMPPS instead. It provides the same basic functionality as XAMPP, but includes installation scripts for over 200 different web applications. You can read about installing AMPPS here.

This video guides you through the installation procedure of XAMPP and how you could use for practicing SQL Queries and much more. XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P).

Click on images for full sized versions.

XAMPP is an extremely easy to install and use Apache Server which comes bundled with MySQL (a database), PHP (server side scripting language), Perl (another server side scripting language), FileZilla FTP Server and Mercury Mail Transport System.

Why would I want to install it?

To allow development and testing on your local machine instead of on a remote (and probably live) server. I use it to test out changes to my website before uploading and committing changes to the real site.


Download the self extracting package, run it and, in most cases, accept the default settings.


1) Go to the SourceForge website and select xampp-win32-1.7.3.exe to download XAMP (this is the self extracting version with the built-in installer):

2) You will be redirected to a download page. If the download does not start in a few seconds, click on the direct download link:

3) Select to either Save the file or to Run it directly over the Internet. Saving allows you to uninstall and reinstall if necessary:


4) Enter the location to extract XAMPP into. By default, it selects the C: drive. I entered my D: drive because I have more space there. [NOTE: XAMPP will automatically create a folder called XAMPP in the directory you specify, having C: as your install folder will result in XAMPP being installed in C:XAMPP]. Click on the Install button:


The XAMPP installation will ask a few configuration questions. It should be safe to accept the defaults.

5) Enter y and press the Enter / Return key for the prompt: Should I add shortcuts to the startmenu/desktop? (y/n): y

6) Enter y and press the Enter / Return key for the prompt:

Should I locate the XAMPP paths correctly?

Should I proceed? (y/x=exit setup): y

7) Enter n and press the Enter / Return key for the prompt:

Should I make a portable XAMPP without drive letters?

NOTE: – You should use drive letters, if you want use services.
– With USB sticks you must not use drive letters.

Your choice? (y/n): n

8) Press the Enter / Return key for the prompt:

XAMPP is ready to use.

Press to continue:

9) Press the Enter / Return key for the prompt:

I have set the timezone in ‘php.ini’ and ‘my.ini’ to “America/New_York”.

You should correct these values if my guess was wrong.

Press to continue:

10) Enter 1 and press the Enter / Return key for the prompt: Please choose (1-7/x): 1. This will start the XAMPP control panel:

Setting Up

11) Click the two check boxes labelled Svc located next to the Apache and MySQL labels. This will install both services for you:

12) Press OK when prompted to install the Apache Service and MySQL service:

13) Observe that the services are now running. If the services are not running, then you need to manually start them. See step (14).

Jiffy lube brake pads

14) If the Apache and MySql services did not start when you installed them, then click on the Start button beside each service. NOTE: The Apache service can take several seconds to start and the application may look as though it is hung – just wait. If the Apache service does not start, see Troubleshooting below.

Testing The Installation

XAMPP is now setup and ready to use on your computer.

To test, launch your browser and enter:

Does Xampp Use Mysql


into your navigation bar. You should see the following display:

The default installation of XAMPP Is not secure and should not be used as a publicly accessible server. However, it functions just fine as a test bed server for various software packages like Joomla!, WordPress, Drupal, or even if you want to experiment with PHP or MySQL.

When you set up a web site under XAMPP, you need to type localhost/my-site into the navigation bar to access it. If you would like to change it so you can type my-site.com instead (so it looks more like a “real” web site), you can find instructions for that here.


Xampp Connect To Mysql

Sometimes the Apache Server will not run. This is most often caused by some other application using port 80 (the http port).

If you are not allowed to change or disable programs using port 80, or if port 80 is being blocked on your computer, consider changing the port the Apache Server uses.

Instructions for changing the port used by Apache Server are found here.

1) Click on Port-Check to see if any other applications or services are using port 80.

2) A console window will appear and XAMPP PortCheck will run. Sample results are shown in the image below. In this case, uTorrent is using port 80 and preventing Apache Server from running. The solution is to either shutdown uTorrent or change its configuration to use a different port.

The more common cause is that Microsoft Internet Information Services (IIS) is running. Instructions for disabling the IIS can be found here.

On our previous post, we have discussed about how to install LAMP Environment on your Windows PC easily using XAMPP. If you are a MySQL coder, or wish to learn it, then probably you have came to know about the MySQL terminal [or simply a command prompt in Windows]. Basically it is the best MySQL tool for any newbie user. You have type all your SQL Queries here manually and this way you can actually learn faster.

But opening the MySQL prompt can be a little tricky in Windows PC. As just typing “mysql” in command prompt does not work… So here is a complete guide to easily open MySQL terminal from Windows Command Prompt.

#1: Install XAMPP and locate installation Directory:

First you need to install XAMPP on your Windows PC. You can install MySQL alone if you want, but I shall recommend XAMPP for a better and easier usage. Simply follow the previous post to install it. Also Note down the installation directory.

Xampp use mysql online

The default installation directory is “C:XAMPP”. It may vary for your customized installation. So assuming this, try to locate this folder:

C:xamppmysqlbin” or “~Installation Folder~xamppmysqlbin

where ~installation Folder~ is obviously the folder where you have selected to install XAMPP.

You should be able to find a file named, mysql.exe . This is the main MySQL Terminal. If you simply open it by double clicking then although a MySQL Terminal will be launched, but you won’t actually be able to modify your database, as in this way MySQL terminal does not get connected to the DB server host!

Just follow the instruction below to open the terminal properly…

#2: Open MySQL terminal from Windows Command Prompt(cmd):

  • Go to Start Menu > All Programs > Accessories > Command Prompt;
  • This will pop up the Windows CMD.
  • Now type in the following command and hit enter:
  • Note that if you have any other installation directory, then you need to replace C:XAMPP accordingly. Rest the Folder structure …mysqlbin remains the same.
  • Now type the following command on the cmd prompt:
    mysql.exe –h localhost –u root -p
  • MySQL will start and will prompt you for a password. Leave it blank and hit enter. This should bring you the MySQL terminal.

Now write and run the SQL Query languages and do whatever you wish to. Below is a process to add shortcut to the MySQL terminal.

#3: Adding shortcut using environment variables:

We will now add a environment variable to windows so that we can open the mysql.exe terminal window anywhere from command prompt without changing the working directory. Just follow the steps below:

  • On Windows 7/ Vista: Go to Control Panel > System > Advanced System Settings > Advance Tab > Environment Variable;
  • On Windows XP: Go to Control Panel > System > Advanced Tab > Environment Variable;
  • Now under “User Variables for ~UserName~” Click on “New” button.
  • Under “Variable Name” type: mysql
  • Under “Variable Value” type: C:xamppmysqlbinmysql.exe
  • Obviously you need to change the location of …/xampp if you have any other installation directory.
  • Now Save everything and close the window.

You are done with creating the shortcuts… To launch MySQL all you need to is:

  • Open up Command Prompt;
  • Type:

    and hit enter (As shown on the first image). Give blank password as before and you are set to go…

Now you have got your MySQL terminal window on your Win7/XP/Vista. Use it the way you want.

I hope the article was informative and useful for you. Please do give your feedback on this. Also if you know any better method of opening MySQL terminal in Windows, then do share it with us!