How to install XAMPP on Linux (Ubuntu 11.04) Part #2

Ok this is the second part of the previous post.If you haven’t read the first part “How to install XAMPP on Linux (Ubuntu 11.04)” please read it before come to this 😀 . Today I’ll tell you how to configure MySQL databases (phpMyAdmin). Because config.inc.php is not set to your Linux username so,you are not still allowed to goto the phpMyadmin page.

First you should get open the terminal and login as root user.

Now press (Clrt+Alt+T) to open Terminal window
then type sudo -s -H

command: cd /opt/lampp/phpmyadmin

Now you are in the phpmyadmin directory, you need to change the ownership of the file config.inc.php to your own Linux username.

command:chown your_user_name:your_user_name config.inc.php

Ok now there is one thing to do.That’s Configure Linux XAMPP Security

In this case too you need to login as root user(only if already logout).Now lets set up the security.

command: /opt/lampp/lampp security

Then the terminal will be ask some questions , type “YES” to all and set password to all. Important thing is write them down in a safe place.

After configuring security the database configuration file alteration automatically happened ,so  you need to change the ownership back to your username as did earlier.

command: cd /opt/lampp/phpmyadmin

command:chown your_user_name:your_user_name config.inc.php

Now you are done with configuring XAMPP 😀 . Restart the XAMPP with this command

command: /opt/lampp/lampp restart

Now check out your overall installation process. First you need to clear your entire browsing history and cache.

Type this on your browser : http://localhost/ then click on “Status” link. If all the things are done correctly, you will see a message like this.

XAMPP Status

XAMPP Status

Now you should be able to login to phpMyAdmin without any trouble. Login with your MySQL username and password that you gave at security configuration.

Important! :

  • phpMyAdmin has to accounts for MySQL as user names root and pma, but both have one password, that you gave. If login as root user, you will be able to have all privileges. But if you log in as pma user privileges will be limited and you are not allowed to create databases (only create tables and access the database).
  • Do not overwrite or delete default files inside your htdocs, becasue they are very important.If you do s XAMPP may be crashed.

webalizer
xampp
favicon.ico
index.php

If you have any doubt about any post feel free to comment and get solved tham.

Thanks

Gihan Malan De Silva.

 

31 Comments

  1. Reply
    Eric June 22, 2011

    Hi Gihan,

    I followed all your instructions. But when I tried accessing the localhost, it keeps on asking for a username and password. I tried the username root and pma with the password I set during the security configuration but it won’t accept it. What could be the problem? TIA.

    • Reply
      Gihan June 22, 2011

      Eric, The user names “root” and “pma” belong to phpMyAdmin and not for the XAMPP pages, here when you set security for XAMPP you have secured your XAMMP pages with a password. When you trying to set passwords to the XAMPP, I thing you remember something like this, displayed on terminal:

      Your XAMPP pages are NOT secured by a password.

      Do you want to set a password? [yes] yes

      Password:

      Password (again):

      Password protection active. Please use ‘lampp‘ as user name!

      So Eric, when you try to access the localhost , the username should be lampp and the password will be the one you gave. 😀 😀
      please be kind to inform me that I’m right or wrong!..
      Thanks..

  2. Reply
    Eric June 22, 2011

    You’re RIGHT! I was able to log in and also my phpmyadmin works fine! You’re the man Gihan! Thank you so much! 🙂

  3. Reply
    Eric June 22, 2011

    You’re RIGHT! I was able to access xampp and also my phpmyadmin works fine! You’re the man Gihan! Thank you so much! 🙂

  4. Reply
    Gihan June 22, 2011

    You are welcome Eric.. 😀

  5. Reply
    Nawras June 29, 2011

    hi
    i have this error when I want to access phpmyadmin please could you help:
    PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable

  6. Reply
    se7en June 30, 2011

    Existing configuration file (./config.inc.php) is not readable.
    what is this???

  7. Reply
    Gihan July 3, 2011

    @Nawras & se7en : First of all sorry for delay, because I was busy with my academic. I think you both guys having same issue. This is happen with wrong configuration of config.inc.php file or you haven’t totally changed the ownership of phpmyadmin into your linux user name.
    If you haven’t done please do it with this on terminal..

    command:chown your_user_name:your_user_name config.inc.php

    It’s better to read my two posts about xampp-ubuntu before do this. If you have any doubt, do not hesitate to ask. Thanks 🙂

  8. Reply
    se7en July 4, 2011

    done! thanks!

  9. Reply
    Gihan July 4, 2011

    🙂 you are welcome se7en…

  10. Reply
    Nawras July 4, 2011

    thank you very muchhh 🙂

  11. Reply
    Gihan July 4, 2011

    you are welcome Nawras.. 🙂

  12. Reply
    Manish Munikar July 25, 2011

    i had tried to install LAMP before. When i goto http://localhost, all that is displayed is:
    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.

    Then i installed XAMPP 1.7.4 exactly as you instructed. All the process went fine. But when i goto http://localhost it still displays the same page “It Works!”……
    Why did this happen? According to you, it must have shown the XAMPP homepage. Did i need to uninstall LAMP before installing XAMPP? Now what should i do?

    • Reply
      Gihan July 25, 2011

      Manish Munikar, this is the actual XAMPP home page http://localhost/xampp/ . But normally when you go to http://localhost/ it automatically displays http://localhost/xampp/ . It’s not a problem I think. Try to run a simple php script on your localhost. Then make the decision whether its working or not 🙂 .Yes you should uninstall LAMP before do it. If you have any doubt feel free to ask and good luck with your work!

  13. Reply
    Taner Temel September 6, 2011

    thank you for a great step by step but when I try to access phpmyadmin I get the following error
    Wrong permissions on configuration file, should not be world writable!
    what chmd should this be and do you have a terminal comand to change this please.

    thank you in advance.

    Tony

  14. Reply
    Gihan September 6, 2011

    Tony, I think you missed one step of procedure. To access the phpmyadmin you should have to change the ownership to your user account..

    I guess, you missed these things…

    login as root:–> sudo -s -H

    command: cd /opt/lampp/phpmyadmin

    command:chown your_user_name:your_user_name config.inc.php

    command: /opt/lampp/lampp restart

    Now check out your overall installation process. First you need to clear your entire browsing history and cache.

    Then try to log phpmyadmin

    If you still having any problems, tell me I will help you..
    Good luck with your work..
    Gihan

  15. Reply
    Taner Temel September 6, 2011

    Hi Gihan thank you for your reply after clearing browser history I managed to see phpmyadmin. So the installation worked thank you but I have one other problem.

    After installing joomla on xampp I am getting an error message for strict standards on the front and back end of the site as below.

    Strict Standards: Static function JDatabase::test() should not be abstract in /opt/lampp/htdocs/17/libraries/joomla/database/database.php on line 350

    The same error starts from line 350 all the way to line 369.

    I have looked online for a solution and they recommend installing a older version of Xampp, but do you know of a way of correcting this issue without downgrading xampp?

    Thanks
    Tony

  16. Reply
    Taner Temel September 6, 2011

    Hello again Gihan I have decided to down grade to xampp 1.7, I have got it installed on my computer and all seems to be working well. In your opinion what are the downside to having xampp 1.7 instead of the latest version?

    Thanks for all your help
    Tony

  17. Reply
    Dav September 22, 2011

    Great help !!!

    Thanks a lot !

    David.

  18. Reply
    yasser October 12, 2011

    thanks a lot .. u are a life saver 🙂
    yasser.

  19. Reply
    sourav November 29, 2011

    Hi,
    I have installed xampp successfully in my Ubuntu system, I type this “sudo /opt/lampp/lampp start” and start xampp . I could see this on my terminal

    Starting XAMPP for Linux 1.5.3a…
    XAMPP: Starting Apache with SSL (and PHP5)…
    XAMPP: Starting MySQL…
    XAMPP: Starting ProFTPD…
    XAMPP for Linux started.

    but when I go and type in http://localhost I get a Unable to Connect message. I have also cleared my browser history and cache.
    please give some advice…thanks a lot!!

    • Reply
      Gihan November 30, 2011

      Hi, have you install lampp or xampp before on your computer, then that will also make some problems, if you haven’t removed previous installation. Seems you’ve done something wrong, but I can’t figure it out. Pls check you edit the httpd.conf correctly and extract the xampp-.tar.gz only by the command and not by the right clicking.

  20. Reply
    sourav December 5, 2011

    Brother you are great!!

  21. Reply
    grenzfrequence December 25, 2011

    For me mysql is disabled in status of xampp, but it was started from xampp. What is the problem? If i try to start an example in xampp, then the password is not found. Where do i have to enter the correct password to make xampp status working for mysql?

  22. Reply
    Denis December 28, 2011

    Wonderful description. Thank you Gihan!

  23. Reply
    Kemar January 9, 2012

    I followed your instructions and everything worked perfectly. Thank you very much for making this information available.
    This is my first attempt at this since I’m new to Linux so I consider myself an amateur and I was able to follow your instructions and get it done – that says a lot about the user-friendliness of this information. Thanks again.

  24. Reply
    hillary April 19, 2012

    thank you for your help. My problem is that when installing joomla i cant go beyond database. i got this messages “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM CHARACTER SET `utf8`’ at line 29 SQL=CREATE TABLE `jos_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default ‘0’, `type` varchar(30) NOT NULL default ‘banner’, `name` varchar(255) NOT NULL default ”, `alias` varchar(255) NOT NULL default ”, `imptotal` int(11) NOT NULL default ‘0’, `impmade` int(11) NOT NULL default ‘0’, `clicks` int(11) NOT NULL default ‘0’, `imageurl` varchar(100) NOT NULL default ”, `clickurl` varchar(200) NOT NULL default ”, `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default ‘0’, `checked_out` tinyint(1) NOT NULL default ‘0’, `checked_out_time` datetime NOT NULL default ‘0000-00-00 00:00:00’, `editor` varchar(50) default NULL, `custombannercode` text, `catid` INTEGER UNSIGNED NOT NULL DEFAULT 0, `description` TEXT NOT NULL DEFAULT ”, `sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `ordering` INTEGER NOT NULL DEFAULT 0, `publish_up` datetime NOT NULL default ‘0000-00-00 00:00:00’, `publish_down` datetime NOT NULL default ‘0000-00-00 00:00:00’, `tags` TEXT NOT NULL DEFAULT ”, `params` TEXT NOT NULL DEFAULT ”, PRIMARY KEY (`bid`), KEY `viewbanner` (`showBanner`), INDEX `idx_banner_catid`(`catid`) ) TYPE=MyISAM CHARACTER SET `utf8`” What is my mistake!

  25. Reply
    aLtUuSh May 1, 2012

    hey gihan thanks for u, but i can’t disable php Display errors. Help me

  26. Reply
    evan October 4, 2012

    Hi Gihan, thanks for the tutorial of the installation. It works well.
    I’d like to disable the user authentication while opening the localhost. What should i need to do?
    Regards,

Leave a Reply