View previous topic :: View next topic |
Author |
Message |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Fri Nov 15, 2002 3:14 pm Post subject: apache with mysql and php support |
|
|
alright, if i install the packges for mysql, apache, and php support?
what else do i have to do to get the interaction between them to work??
do i need to emerge any other packages? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ethernal Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/c2cc40043dca29d123387.jpg)
Joined: 06 Nov 2002 Posts: 106 Location: Stockholm, Sweden
|
Posted: Fri Nov 15, 2002 3:15 pm Post subject: |
|
|
I'm not sure, but I think you need mod_php and mod_sql as well, anyone who can confirm/deny this ? _________________ Hmm.. Of course, these are MY opinions - likely to be just as flawed as anyone else's. Um, really, I guess you should assume everyone's speaking out of some external influence. Believe in whatever makes sense to you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mat_le_ouf Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_farnsworth.gif)
Joined: 13 Sep 2002 Posts: 257 Location: France
|
Posted: Fri Nov 15, 2002 4:00 pm Post subject: |
|
|
To run pache with PHP4 support, just edit the /etc/conf.d/apache file and uncomment the following line :
Code: | APACHE_OPTS="-D PHP4" |
And run apache with :
Code: | runscript /etc/init.d/apache start |
I think that the link to be done with MySQL is between PHP and MySQL, apache has nothing to do in it...
Look in /etc/apache/conf/php.ini for PHP with MySQL. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Fri Nov 15, 2002 4:04 pm Post subject: |
|
|
root@spyder spyder # mysqladmin -u root password 'blargblarg'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
when i try to change the root password |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Mat_le_ouf Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_farnsworth.gif)
Joined: 13 Sep 2002 Posts: 257 Location: France
|
Posted: Fri Nov 15, 2002 4:11 pm Post subject: |
|
|
Hmm, i'm not an expert in MySQL, I think someone else should be better to solve this problem...
However, is PHP working? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Fri Nov 15, 2002 4:19 pm Post subject: |
|
|
ya it is... :/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rac Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/42db5dbb3e1c92424d747.jpg)
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Fri Nov 15, 2002 7:11 pm Post subject: |
|
|
spyder wrote: | root@spyder spyder # mysqladmin -u root password 'blargblarg'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
when i try to change the root password |
Probably a silly question, but is the server running? "/etc/init.d/mysql start" if not. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fyerk Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Fri Nov 15, 2002 8:28 pm Post subject: |
|
|
spyder wrote: | root@spyder spyder # mysqladmin -u root password 'blargblarg'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
when i try to change the root password |
Are you trying to change the root password or set the root password (for the first time) ? _________________ -David |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rizzo Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/7070208983e8345b9651f5.png)
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Fri Nov 15, 2002 8:48 pm Post subject: |
|
|
Ethernal wrote: | I'm not sure, but I think you need mod_php and mod_sql as well, anyone who can confirm/deny this ? |
You don't need mod_sql, but you want mod_php, not php. Make sure you have "mysql" in your USE flags. Then run these commands:
Code: | emerge apache mod_php mysql
/usr/bin/mysql_install_db
ebuild /var/db/pkg/dev-php/mod_php-4.2.2-r1/mod_php-4.2.2-r1.ebuild config
vi /etc/conf.d/apache (uncomment the line with "PHP4")
rc-update add apache default
rc-update add mysql default
/etc/init.d/mysql start
/etc/init.d/apache start
|
That should set you up. I just did this morning. I'm surprised there isn't a "Tips 'n Tricks" on this already. If not I'll write one up. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
darktux Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/d5e4bdd03dfd1b80db613.jpg)
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Sat Nov 16, 2002 5:10 pm Post subject: |
|
|
The correct thing to do to connect to the MySQL daemon, would be and then type in your password. If you have not yet set your password, then you should be able to log in just by typing mysql -uroot
Last edited by darktux on Sat Nov 16, 2002 10:47 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
slais-sysweb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/80282f103d0a4b8b5bd6b.png)
Joined: 14 Jun 2002 Posts: 221 Location: London
|
Posted: Sat Nov 16, 2002 8:22 pm Post subject: |
|
|
spyder wrote: | root@spyder spyder # mysqladmin -u root password 'blargblarg'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
when i try to change the root password |
I had this problem yesterday it was cured by ensuring that /etc/hosts had an entry for the server that matched the name setup in /etc/hostname.
Code: | 127.0.0.1 localhost yourserver.domain |
may also work, but I seem to remember a note somewhere about this causing a problem with something so i suggest
/etc/hostname
and
/etc/hosts
Code: | 127.0.0.1 localhost
xxx.x.x.x server.domain |
_________________ --
djc
sysweb SLAIS UCL |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 4:31 am Post subject: thanks |
|
|
thanks everyone..especially rizzo...i am trying that now..i'll let you know how it turns out.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 4:53 am Post subject: |
|
|
root@spyder mp3sb_serv # mysql -u root -p < MySQL_create_Table.sql
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
whats that mean?? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lapu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 28 Aug 2002 Posts: 15
|
Posted: Sun Nov 17, 2002 12:56 pm Post subject: |
|
|
spyder wrote: | root@spyder mp3sb_serv # mysql -u root -p < MySQL_create_Table.sql
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
whats that mean?? |
Again a silly question, is server running
/etc/init.d/mysqld start |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 1:11 pm Post subject: ya |
|
|
ya it has...
root@spyder spyder # /etc/init.d/mysql start
* WARNING: "mysql" has already been started.
root@spyder spyder # mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lapu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 28 Aug 2002 Posts: 15
|
Posted: Sun Nov 17, 2002 1:25 pm Post subject: Re: ya |
|
|
spyder wrote: | ya it has...
root@spyder spyder # /etc/init.d/mysql start
* WARNING: "mysql" has already been started.
root@spyder spyder # mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) |
Do you have /var/run/mysqld/mysqld.sock |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 1:27 pm Post subject: |
|
|
ya it's there
spyder@spyder spyder $ ls -la /var/run/mysqld/
total 8
drwxr-xr-x 2 mysql mysql 4096 Nov 17 03:01 .
drwxr-xr-x 4 root root 4096 Nov 17 03:07 ..
srwxrwxrwx 1 mysql mysql 0 Nov 17 03:01 mysqld.sock |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
oblique effect n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Zelda/Zelda_-_Princess_Ruto.jpg)
Joined: 14 Nov 2002 Posts: 4
|
Posted: Sun Nov 17, 2002 4:07 pm Post subject: http://www.linuxnewbie.org/forum/forumdisplay.php?s=06fd8480 |
|
|
First off, I noticed that you haven't tried doing just 'mysql -u root'. I know that the first time you startup mysql and login to it there is no root password set. maybe try issueing 'mysqladmin -u root -password 'newpasswd'. There is more help and better answers in other places, like www.linuxnewbie.org
Hope that leads you the right direction.
oblique |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 4:10 pm Post subject: |
|
|
spyder@spyder spyder $ mysql -u root
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rac Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/42db5dbb3e1c92424d747.jpg)
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Nov 17, 2002 7:53 pm Post subject: |
|
|
Do you have Unix domain socket support in your kernel? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Sun Nov 17, 2002 9:24 pm Post subject: |
|
|
ya i do |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Mon Nov 18, 2002 1:51 am Post subject: |
|
|
please help me figure this out |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
lapu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 28 Aug 2002 Posts: 15
|
Posted: Mon Nov 18, 2002 10:55 am Post subject: |
|
|
Have you installed strace.
What says #strace mysql
.....
connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = -1 ENOENT (No such file or directory)
.....
or
....
connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = 0
... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Mon Nov 18, 2002 4:44 pm Post subject: |
|
|
connect(3, {sin_family=AF_UNIX, path="/tmp/mysqld.sock"}, 110) = -1 ECONNREFUSED (Connection refused) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spyder Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 06 Nov 2002 Posts: 121
|
Posted: Mon Nov 18, 2002 4:46 pm Post subject: |
|
|
i tried changing it back to the original place andi got this
connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = -1 ENOENT (No such file or directory) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|