Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache with mysql and php support
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lapu
n00b
n00b


Joined: 28 Aug 2002
Posts: 15

PostPosted: Mon Nov 18, 2002 5:44 pm    Post subject: Reply with quote

is apache using /tmp/mysqld.sock
and mysql uses /var/run/mysqld/mysqld.sock?
check out /etc/mysql/my.conf
and /etc/apache/conf/php.ini
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Mon Nov 18, 2002 6:53 pm    Post subject: Reply with quote

apache has nothing to do with it yet...just from teh console of linux i can't run mysql
Back to top
View user's profile Send private message
pato
n00b
n00b


Joined: 16 Nov 2002
Posts: 9

PostPosted: Tue Nov 19, 2002 1:03 am    Post subject: Reply with quote

This might be something completely off the wall, but you are root while you are trying all this, right? Just asking, because I know from experience that /var/lib/mysql is usually not world-readable, therefore users other than root can't get access to the socket. I usually change /etc/my.cnf to put the socket file in /tmp. Normally, you don't see the socket access error when you are running as root. It's not until you get everything set up that you realize ordinary users can't get access to the socket in /var/lib/mysql.

If this is the first time you are trying to log into mysql after installation, you should be able to just type 'mysql' as root and get a mysql> prompt right away, since there isn't a password for root by default.

HTH
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Tue Nov 19, 2002 1:21 am    Post subject: Reply with quote

i was su'd to root
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Tue Nov 19, 2002 1:23 am    Post subject: Reply with quote

i just tried it logged in as root, not su'ing to root

still the same thing...
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Tue Nov 19, 2002 2:35 am    Post subject: Reply with quote

Most of the google Groups stuff I turned up on this had to do with either chroot being the problem/fix or a config file setting:

link

and suggest doing a test to see if the mysql listener is running:
netstat -an|grep mysql

Anyway, I'm not at the mysql step on my box yet.. still beating on apache itself or I might be more help.. :)

EDIT (rac): inlined link to avoid phpBB line break uglyness.
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Tue Nov 19, 2002 3:32 am    Post subject: Reply with quote

root@spyder spyder # netstat -an|grep mysql
root@spyder spyder #


nothing...

root@spyder spyder # ls -la /tmp/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Nov 18 17:29 /tmp/mysqld.sock
root@spyder spyder #


is a byte size of 0 correct??? thats what it made when i first ran safe_mysqld
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Tue Nov 19, 2002 3:36 am    Post subject: Reply with quote

root@spyder spyder # mysqladmin -h localhost version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (111)'
Check that mysqld is running and that the socket: '/tmp/mysqld.sock' exists!
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Tue Nov 19, 2002 5:11 am    Post subject: Reply with quote

Okay, so netstat shows that it's not listening.

How about seeing if the mysqld process is even running...?
ps -A | grep mysqld

Mysqladmin can't possibly work if Mysql itself isn't running, so that's probably where the attention should be focused.
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
mooman
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 175
Location: Vancouver, WA

PostPosted: Tue Nov 19, 2002 5:19 am    Post subject: Reply with quote

Here's a thread I ran across about starting mysql as a user:

The last post has some info about starting up mysql.. maybe something there is useful?

EDIT (rac): inlined link to avoid phpBB linebreak uglyness.
_________________
Linux user off and on since circa 1995
Back to top
View user's profile Send private message
ozukir@
Apprentice
Apprentice


Joined: 14 Oct 2002
Posts: 209
Location: USA

PostPosted: Tue Nov 19, 2002 7:27 am    Post subject: Reply with quote

I had a similar problem, same messages at least. Try:
Code:
$mysql -u root -h YOURHOSTNAME.DOMAIN -p

That's what I had to do to initially log on. Then I grant priviledges to root@localhost. Hope that helps.
Back to top
View user's profile Send private message
lapu
n00b
n00b


Joined: 28 Aug 2002
Posts: 15

PostPosted: Tue Nov 19, 2002 9:17 am    Post subject: Reply with quote

/etc/mysql/my.conf
...
[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
#socket =/tmp/mysqld.sock

[safe_mysqld]
err-log = /var/log/mysql/mysql.err

[mysqld]
#skip-networking
skip-innodb
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
#socket =/tmp/mysqld.sock
port = 3306
log = /var/log/mysql/mysql.log
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
...
#/etc/init.d/mysql start
# ls -la /var/run/mysqld/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Nov 8 04:47 /var/run/mysqld/mysqld.sock
# mysqladmin --socket=/var/run/mysqld/mysqld.sock version
mysqladmin Ver 8.23 Distrib 3.23.52, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 3.23.52-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 5 min 14 sec

Threads: 2 Questions: 2 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.006
#strace mysql
....
connect(3, {sin_family=AF_UNIX, path="/var/run/mysqld/mysqld.sock"}, 110) = 0
....
hope this will help
Back to top
View user's profile Send private message
spyder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2002
Posts: 121

PostPosted: Tue Nov 19, 2002 2:08 pm    Post subject: Reply with quote

that didn't work either
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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 vote in polls in this forum