Unanswered: Cant start server when install mysql in path other than /usr/local
I installed mysql-standard-4.1.4-gamma-pc-linux-i686 on my linux machine (Fedora FC2). Because I want to install on the path /db4 other than standard /usr/local, I did in the following way:
1. extracted the .tar.gz file to /db4/ and made a simbolic link
$ln -s /db4/mysql-standard-4.1.4-gamma-pc-linux-i686 /db4/mysql
2. cd into mysql folder. Run the script
3. $chown -R root .
$chown -R mysql data
$chgrp -R mysql .
4. Run server
$bin/mysqld_safe --user=mysql --basedir=/db4/mysql --datadir=/db4/mysql/data
And system responded this:
Starting mysqld daemon with databases from /db4/mysql/data
041101 00:21:33 mysqld ended
The server didnt start. What have I done wrong? Is there anything I forgot to configure for the alternative path settings? I'm really frustrated. Do I have to install mysql in /usr/local/? In fact I only want to create a database with datafiles located in the /db4 folder, so I tried installing mysql there. Any helps are appreciated.
Is it the problem of my previous installed rpm version of mysql because at first I installed the rpm version of mysql-4.1. Then I tried to uninstall it, so do the following:
$ rpm -e MySQL-server-4.1.4-0
error reading information on service mysql: No such file or directory
error: %preun(MySQL-server-4.1.4-0) scriptlet failed, exit status 1
041101 10:44:32 mysqld started
041101 10:44:33 [ERROR] Warning: Asked for 196608 thread stack, but got 126976
041101 10:44:33 [ERROR] Can't start server : Bind on unix socket: Permission denied
041101 10:44:33 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
041101 10:44:33 [ERROR] Aborting