Results 1 to 10 of 12
Hi
Have installed mysql 4.0.21 on red hat 8.0 and all seems ok until I try to run the server with
./bin/myslqd_safe &
gives
Starting mysqld daemon with databases from ...
- 09-20-2004 #1Just Joined!
- Join Date
- Nov 2002
- Location
- Cambs Uk
- Posts
- 31
Mysql server exiting immediately
Hi
Have installed mysql 4.0.21 on red hat 8.0 and all seems ok until I try to run the server with
./bin/myslqd_safe &
gives
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
040920 12:58:20 mysqld ended
I cannot find this pid file - any ideas why it is stopping the server?
Ta
- 09-20-2004 #2
Have you tried running it as root?
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 09-20-2004 #3
Check the logs in /var/log and see what they say.
- 09-21-2004 #4Just Joined!
- Join Date
- Nov 2002
- Location
- Cambs Uk
- Posts
- 31
Yes Im running it as root.
Ive checked the log and im getting(with date and time)
mysqld started
Warning: Asked for 196608 thread stack, but got 126976
Can't start server : Bind on unix socket: Permission denied
Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock
Aborting
Shutdown complete
There does seem to be a previous version installed, but If i do a ps -augx I cannot see any mysql demons running.
- 09-21-2004 #5
- 09-21-2004 #6Just Joined!
- Join Date
- Nov 2002
- Location
- Cambs Uk
- Posts
- 31
I used mysql-standard-4.0.21-pc-linux-i686 from mysql.com
copied it to /tmp directory
groupadd mysql
useradd -g mysql mysql
changed to /usr/local (as recommended by book managind and using Mysql by orielly)
cd /usr/local
unpacked
gunzip -c /tmp/mysql-standard-4.0.21-pc-linux-i686.tar.gz | tar -xf-
created symbolic link
ln -s mysql-standard-4.0.21-pc-linux-i686 mysql
then did
scripts/mysql_install_db
chown -R root /usr/local/mysql
chgrp -R mysql /usr/local/mysql
chown -R mysql /usr/local/mysql/data
finally tried to start server
bin/safe_mysqld --user=mysql &
Any help?
- 09-21-2004 #7
Did you su to mysql user when running
if you did not this is the problem. You need to su to mysql user and re run the script then it will work (you might need to remove the contents of /var/lib/mysql? Try it without first!). The problem is you created all the database files as user root so when mysqld starts as user mysql then theres a permissions problem.Code:scripts/mysql_install_db
- 09-21-2004 #8Just Joined!
- Join Date
- Nov 2002
- Location
- Cambs Uk
- Posts
- 31
No I didnt do that so I have done it now, but I got the same errors. I tried starting the server as root and that has worked !
Guess this is not a good thing.
- 09-21-2004 #9
No dont run it as root, Whats the permissions on /var/lib/mysql and its contents?
- 09-21-2004 #10Just Joined!
- Join Date
- Nov 2002
- Location
- Cambs Uk
- Posts
- 31
Permissions are
drwxr-xr-x 4 root mysql 4096 Sep 21 11:54 mysql/
in mysql
drwx------ 2 root mysql 4096 Sep 20 11:00 ./
drwxr-xr-x 4 root mysql 4096 Sep 21 11:54 ../
-rw-rw---- 1 root mysql 8778 Sep 20 11:00 columns_priv.frm
-rw-rw---- 1 root mysql 0 Sep 20 11:00 columns_priv.MYD
-rw-rw---- 1 root mysql 1024 Sep 20 11:00 columns_priv.MYI
-rw-rw---- 1 root mysql 8982 Sep 20 11:00 db.frm
-rw-rw---- 1 root mysql 302 Sep 20 11:00 db.MYD
-rw-rw---- 1 root mysql 3072 Sep 20 11:00 db.MYI
-rw-rw---- 1 root mysql 8641 Sep 20 11:00 func.frm
-rw-rw---- 1 root mysql 0 Sep 20 11:00 func.MYD
-rw-rw---- 1 root mysql 1024 Sep 20 11:00 func.MYI
-rw-rw---- 1 root mysql 8958 Sep 20 11:00 host.frm
-rw-rw---- 1 root mysql 0 Sep 20 11:00 host.MYD
-rw-rw---- 1 root mysql 1024 Sep 20 11:00 host.MYI
-rw-rw---- 1 root mysql 8877 Sep 20 11:00 tables_priv.frm
-rw-rw---- 1 root mysql 0 Sep 20 11:00 tables_priv.MYD
-rw-rw---- 1 root mysql 1024 Sep 20 11:00 tables_priv.MYI
-rw-rw---- 1 root mysql 9148 Sep 20 11:00 user.frm
-rw-rw---- 1 root mysql 428 Sep 20 11:00 user.MYD
-rw-rw---- 1 root mysql 2048 Sep 20 11:00 user.MYI


Reply With Quote
