mysql

maman durahman durahman at gmail.com
Wed Dec 13 02:18:12 UTC 2006


There is a lot of way to lear mysql. May be ( i have not try it yet)
an easiest way to install is XAMPP. With this you have mysql, apache,
php in one package. Phpmyadminn too, i think.

With xampp you need not to install a think. Just download xampp,
extract to a folder, and start.

Here is a complete writing about it, I found it from ubuntu forum and others;

HOWTO: Setup easy web development environment (XAMPP)
This is a how-to for setting up a web development environment easily.
This guide will install the XAMPP lampp stack into /opt, setup an easy
way to start it up and shut it down, and link a folder in your home
directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not
be used as a public webserver. To setup a public webserver follow the
directions on the Ubuntu wiki
https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are
included (in the main repo, or on the Ubuntu Server CD) and this is a
great way to setup a server. The ubuntu developers have prepared a
great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you
just want a quick web server for development?

Fortunately there is the XAMPP project:
http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles
Apache, PHP4 & 5, Perl, mySQL, and a bunch of other
utilities/applications into an simple package for Mac OSX, Windows,
Solaris, and Linux. Obviously this HOWTO only deals with the linux
version.

For those of you with already existing Apache/mySQL/php installations
it installs everything into /opt so it doesn't conflict with any other
installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

   1. Download the most recent version of XAMPP: (at time of writing 1.5.3a)
      http://prdownloads.sourceforge.net/x...ar.gz?download
      (Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
   2. Extract the archive to /opt using sudo: (make sure you are in
the directory that you downloaded the archive to)
      Code:

      sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:
Code:

sudo /opt/lampp/lampp start

Stop XAMPP

To stop it, open a terminal and type this:
Code:

sudo /opt/lampp/lampp stop

Additional XAMPP commands

To see additional commands, open a terminal and type this:
Code:

sudo /opt/lampp/lampp

Sweet XAMPP Control Panel



To use the sweet gtk/python control panel:

Run in a terminal:
Code:

gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.
Code:

[Desktop Entry] Comment=Start/Stop XAMPP Name=XAMPP Control Panel
Exec=gksudo "python
/opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8 Terminal=false Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg

"XAMPP Control Panel" will show up in your applications menu under
Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:



Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The
easiest way to start working on files is to link a folder in your home
directory into this directory.
My user name is peter so I have /home/peter/public_html linked to
/opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I
get a listing of all the files/folders in that directory. (As long is
there isn't a index.php/html/etc file)
To set this up, run in a terminal:

   1. Make public_html directory in home directory:
      Code:

      mkdir ~/public_html

   2. Link to /opt/lampp/htdocs
      Code:

      sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published
to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

   1. The MySQL administrator (root) has no password.
   2. The MySQL daemon is accessible via network.
   3. ProFTPD uses the password "lampp" for user "nobody".
   4. PhpMyAdmin is accessible via network.
   5. Examples are accessible via network.
   6. MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack
your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
Code:

sudo /opt/lampp/lampp security

START AND STOP PARAMETERS
Parameter 	Description
start 	Starts XAMPP.
stop 	Stops XAMPP.
restart 	Stops and starts XAMPP.
startapache 	Starts only the Apache.
startssl 	Starts the Apache SSL support. This command activates the
SSL support permanently, e.g. if you restarts XAMPP in the future SSL
will stay activated.
startmysql 	Starts only the MySQL database.
startftp 	Starts the ProFTPD server. Via FTP you can upload files for
your web server (user "nobody", password "lampp"). This command
activates the ProFTPD permanently, e.g. if you restarts XAMPP in the
future FTP will stay activated.
stopapache 	Stops the Apache.
stopssl 	Stops the Apache SSL support. This command deactivates the
SSL support permanently, e.g. if you restarts XAMPP in the future SSL
will stay deactivated.
stopmysql 	Stops the MySQL database.
stopftp 	Stops the ProFTPD server. This command deactivates the
ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will
stay deactivated.
security 	Starts a small security check programm.
For example: To start Apache with SSL support simply type in the
following command (as root):

/opt/lampp/lampp startssl

You can also access your Apache server via SSL under https://localhost.
* What is where?
What is where? A big question of our existens, here are some answers! ;)
IMPORTANT FILES AND DIRECTORIES
File/Directory 	Purpose
/opt/lampp/bin/ 	The XAMPP commands home. /opt/lampp/bin/mysql calls
for example the MySQL monitor.
/opt/lampp/htdocs/ 	The Apache DocumentRoot directory.
/opt/lampp/etc/httpd.conf 	The Apache configuration file.
/opt/lampp/etc/my.cnf 	The MySQL configuration file.
/opt/lampp/etc/php.ini 	The PHP configuration file.
/opt/lampp/etc/proftpd.conf 	The ProFTPD configuration file. (since 0.9.5)
/opt/lampp/phpmyadmin/config.inc.php 	The phpMyAdmin configuration file.
* Stopping XAMPP
To stop XAMPP simply call this command:

/opt/lampp/lampp stop

You should now see:

Stopping LAMPP 1.5.5a...
LAMPP: Stopping Apache...
LAMPP: Stopping MySQL...
LAMPP stopped.

And XAMPP for Linux is stopped.
* Uninstall
To uninstall XAMPP just type in this command:

rm -rf /opt/lampp

The end.

On 13/12/06, User Iam <vramnum10 at gmail.com> wrote:
> Hi
>
>  I want to learn MySQL
>
>
>  Did an apt-cache search  MySQL
>
>  There is a lot of stuff there!!!!!!
>
>  What is the best min install...
>

-- 
Wasalam,
Durahman
=====================
http://durahman.wordpress.com/
https://durahman.wordpress.com




More information about the ubuntu-users mailing list