0% found this document useful (0 votes)
97 views31 pages

Xampp, PHP, Mysql and Php+Mysql

XAMPP is a free and open source package that contains Apache HTTP Server, MySQL database, and interpreters for PHP and Perl. It allows users to create a local web development environment without needing a live web server. The document discusses downloading and installing XAMPP, securing the MySQL server with passwords, connecting to MySQL from PHP, and performing basic operations like inserting data into MySQL tables.

Uploaded by

mohibullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views31 pages

Xampp, PHP, Mysql and Php+Mysql

XAMPP is a free and open source package that contains Apache HTTP Server, MySQL database, and interpreters for PHP and Perl. It allows users to create a local web development environment without needing a live web server. The document discusses downloading and installing XAMPP, securing the MySQL server with passwords, connecting to MySQL from PHP, and performing basic operations like inserting data into MySQL tables.

Uploaded by

mohibullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Xampp, PHP, MySQL and PHP+MySQL

28, Jun,2009

26th Lecture

1
• XAMPP is a free and open source cross-
platform web server package, consisting
mainly of the Apache HTTP Server, MySQL
database, and interpreters for scripts written in
the PHP and Perl programming languages.

2
• XAMPP's name is an acronym for:
– X (meaning cross-platform)
– Apache HTTP Server
– MySQL
– PHP
– Perl

3
Download Links

• Xampp for Linux


– http://www.apachefriends.org/en/xampp-linux.html
• Xampp for Windows
– http://www.apachefriends.org/en/xampp-windows.html

• Xampp for Mac OS X


– http://www.apachefriends.org/en/xampp-macosx.html

• Xampp for Solaris


– http://www.apachefriends.org/en/xampp-solaris.html

4
Installation

• Now that we have downloaded the


XAMPP file, the next step is to install it.
– Note - If you are running the Skype VOIP
application, or if you are running IIS Server,
you will need to exit them before
proceeding. Apache cannot start as a
service if Skype or IIS is also running though
when XAMPP is not in use, you can exit
XAMPP to use Skype or IIS.

5
• Stop Skype or Disable:
– Use port 80 and 443 as
alternatives for
incoming connections.

6
1

7
5

8
• Now, fire up your favorite browser and in the address bar,
enter http://localhost or http://127.0.0.1 and afterward
select your language
To continue.

9
Job Done!

10
• Click on STATUS in the left column to confirm
what’s running and what’s not.

11
Security

• Anyone that knows your IP address can easily breach


your server and change details in such a what that
prevents your accessing it yourself and delete any
websites you may have created. But not to worry, we
will rectify this. Let’s take care of the XAMPP directory
and the MySQL Server first. Click on
http://localhost/security/xamppsecurity.php link. You
will be redirected to a new page that will allow you to
setup a password for MySQL as well as setup a
username and password for your XAMPP directory.

12
13
14
MySQL and PHP in xampp

• MySQL starts without a password for "root". So


in PHP you can connect the MySQL-Server
with: mysql_connect("localhost","root","");
If you want to set a password for "root" in
MySQL, please use "mysqladmin" under
Console. For example:

– \...\xampp\mysql\bin\mysqladmin -u root password secret

15
What is PHP?

• PHP stands for PHP: Hypertext Preprocessor


• PHP is a server-side scripting language, like ASP
• PHP scripts are executed on the server
• PHP supports many databases (MySQL, Informix, Oracle,
Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
• PHP is an open source software
• PHP is free to download and use

16
What is a PHP File?

• PHP files can contain text, HTML tags and scripts


• PHP files are returned to the browser as plain HTML
• PHP files have a file extension of ".php", ".php3", or
".phtml"

17
What is MySQL?

• MySQL is a database server


• MySQL is ideal for both small and large
applications
• MySQL supports standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use

18
• The MySQL database package consists of the following:
– The MySQL server: This is the heart of MySQL. You can
consider it a program that stores and manages your
databases.
– MySQL client programs: MySQL comes with many client
programs. The one with which we'll be dealing a lot is
called mysql. This provides an interface through which you
can issue SQL statements and have the results displayed.
– MySQL client Library: This can help you in writing client
programs in C. (We won't be taking about this in our
tutorial).

19
The difference between MySQL and mysql

– MySQL is used to refer to the entire MySQL


distribution package or the MySQL server, while
mysql refers to a client program.

20
Running and Stopping MySQL

– On Windows

21
– On Linux
• change to /etc/rc.d/init.d/ directory
– Mysql start

22
Basic operations

23
24
25
26
Inserting data into tables

27
• On Windows:
– Move the file to c:\mysql\bin.
– Make sure MySQL is running.
– Issue the following command

28
• On Linux

29
References

• Wikipedia contributors, "XAMPP," Wikipedia, The Free Encyclopedia,


http://en.wikipedia.org/w/index.php?title=XAMPP&oldid=292225124 (accessed
May 25, 2009).

• http://www.w3schools.com/PHP/php_mysql_intro.asp

30
Any…

31

You might also like