Installing and using XAMPP instead of PHP, MySQL, and Apache

  • AcidSpill
  • Born
  • Born
  • AcidSpill
  • Posts: 4

Post 3+ Months Ago

I have Windows XP Home Edition, and intead of installing PHP, Apache, and MySQL, I installed something simpler that uses all that: XAMPP
You can find more about XAMPP at http://www.apachefriends.org/
It has an easy installer, so it really simplifies running Apache, MySQL, phpMyAdmin, and PHP. However, I'm having a little problem using XAMPP's phpMyAdmin to facilitate my MySQL connections. I set up a password for MySQL, and now my phpMyAdmin does not connect to MySQL, because it doesn't specify the password I set up on some file. I don't know what file I need to edit to get it to specify that, or what exactly I need to edit on the file, because I'm really knew to php, and to XAMPP. Here is what I did to get my MySQL passworded, and to thereby get my phpMyAdmin not to run properly with it:

1. I installed XAMPP (not a problem)
2. than I looked at the ApacheFriends documentation at http://www.apachefriends.org/faq-en.html , and clicked on the Apache for Windows FAQ link.
3. From there, I followed the following part of the tutorial:
Everyone can use PHPMyAdmin from outside!


In the basic adjustment of XAMPP, PHPMyAdmin have a public access. You can close this gap with the "config.inc.php". Open the configuration file of PHPMyAdmin and edit the 'auth_type' lines:
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'secret';
This becomes ...
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'secret';
Now, user and password are checking before PHPMyAdmin access the mysql server. Optionally you can set 'cookie' for 'http'.

4. Once I did that, and went back to http://localhost/xampp/ and clicked on phpMyAdmin, under tools, I got the following error:
* phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
Error
MySQL said:
Access denied for user: 'root@localhost' (Using password: NO)

So here is my question:
How do I change the phpMyAdmin setup to use the password I set up for my MySQL database? Could you help me with that?

I could just change it back to the original configuration, but my concern with that is that according to the small documentation that came with XAMPP, that would make my computer's security vulnerable, because anyone would be able to access my web server without entering a password. So, I can't do that. Any suggestions?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

it sounds like you haven't set the password for your root user in MySQL, which you should probably do straight away. go to the mysql bin directory (on a commmand line) and do something along the lines of:
Code: [ Select ]
shell> mysql -u root
mysql>\u mysql
mysql> INSERT INTO user
  ->   VALUES('localhost','some_username',PASSWORD('some_pass'),
  ->   'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
mysql> INSERT INTO user
  ->   VALUES('%','some_username',PASSWORD('some_pass'),
  ->   'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
  1. shell> mysql -u root
  2. mysql>\u mysql
  3. mysql> INSERT INTO user
  4.   ->   VALUES('localhost','some_username',PASSWORD('some_pass'),
  5.   ->   'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
  6. mysql> INSERT INTO user
  7.   ->   VALUES('%','some_username',PASSWORD('some_pass'),
  8.   ->   'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

That will at least give you some security from the outside world, and if you're scripts are trying to pass a password already, that should clear up any improper query errors you might be getting

Regardless of your distribution, you should probably check out the documentation available at http://www.mysql.org

hth
This
  • natas
  • PHP Ninja
  • Proficient
  • natas
  • Posts: 308
  • Loc: AFK

Post 3+ Months Ago

I have recently downloaded and attempted to install XAMPP.

The MySQL is fine. I see no problems whatsoever there.

The install of APACHE seemed to run smoothly, until I tried to actually start it.

I got this error message:

Quote:
<OX 10048> Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


I hate to attempt at a guess as I don't know diddly squat about this except what I read at XAMPP FAQ.
I have checked to see if my Skype is running at port 80 and changed it.
I have also uninstalled and reinstalled the whole thing with no luck.

Any help would be greatly appreciated.
Also, if there is any more information you may require in order to assist me, I'd be glad to post it. I just didn't want to clutter up the post with useless info.


ETA: I figured out the above. Skype was using socket 80. (I think) either way. that part is resolved.
  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Posts: 139

Post 3+ Months Ago

Personally, I like WAMP.

http://www.wampserver.com/

:)

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 40 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.