Page 1 of 1

mysql on lampp can't be activated in any way

PostPosted: 08. August 2006 15:11
by liu
he problem happened on lampp, but i can not handle it to work right, please help me,thank you.

after download lampp 1.5.3,the following steps were carried out:

Code: Select all
root@BioInfoServ:/home/biowee# /opt/lampp/lampp start
Starting XAMPP for Linux 1.5.3...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


then,the services were checked out
Code: Select all
root@BioInfoServ:/home/biowee# ps -ef | grep mysqld
root     17396     1  0 17:07 pts/1    00:00:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/run/mysqld.pid
mysql    17468 17396  0 17:07 pts/1    00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --user=mysql --pid-file=/opt/lampp/var/run/mysqld.pid --skip-locking --port=3306 --socket=/opt/lampp/var/run/mysqld.sock
root     18549     1  0 17:35 ?        00:00:02 gedit file:///opt/lampp/var/run/mysqld.pid
root     23096 17194  0 20:01 pts/1    00:00:00 grep mysqld


but, when browsing from http://localhost, the status looked like this
Code: Select all
Component Status Hint
MySQL database DEACTIVATED
PHP ACTIVATED
Perl ACTIVATED
Common Gateway Interface (CGI) ACTIVATED
Server Side Includes (SSI) ACTIVATED
PHP extension »eAccelerator« DEACTIVATED see FAQ
PHP extension »OCI8/Oracle« DEACTIVATED see FAQ


so, i had to restart lampp:
Code: Select all
root@BioInfoServ:/home/biowee# /opt/lampp/lampp start
Starting XAMPP for Linux 1.5.3...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


but, it's so mazing: 'XAMPP: Another MySQL daemon is already running." and phpmyqdmin didn't worked well:
Code: Select all
welcome to phpMyAdmin 2.8.1
MySQL said:
#2002 - Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock'


my.cnf looked like this:

Code: Select all
[client]
#password   = your_password
port      = 3306
socket      = /opt/lampp/var/run/mysqld.sock
[mysqld_safe]
socket      = /opt/lampp/var/run/mysqld.sock
nice      = 0

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /opt/lampp/var/run/mysqld.sock
user      = mysql
pid-file   = /opt/lampp/var/run/mysqld.pid
basedir      = /opt/lampp
datadir      = /opt/lampp/var/mysql
tmpdir      = /opt/lampp/tmp


i have chmod /opt/lampp as nobody:nogroup, now what and how to do?

PostPosted: 08. August 2006 15:25
by Wiedmann
See the difference:
mysql 17468 17396 0 17:07 pts/1 00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --user=mysql --pid-file=/opt/lampp/var/run/mysqld.pid --skip-locking --port=3306 --socket=/opt/lampp/var/run/mysqld.sock


#2002 - Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock'

i am sorry to paste it wrong

PostPosted: 08. August 2006 16:13
by liu
Code: Select all
welcome to phpMyAdmin 2.8.1
MySQL said:
#2002 - Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock'

should be
Code: Select all
#2002 - the server is not responding (or the local MySQL server's socket is not correctly configured
[/code]

so it's not the diffrent from "mysql.sock" and "mysqld.sock", and the other wrong configures?

PostPosted: 08. August 2006 16:40
by Wiedmann
2002 - Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock'

should be
#2002 - the server is not responding (or the local MySQL server's socket is not correctly configured

Then your first post was a lie or you have changed something?

i posted it wrong

PostPosted: 08. August 2006 16:57
by liu
when i posted it, i copied it from wrong page on website,. my second post was the real error log. That is to say "#2002 - the server is not responding (or the local MySQL server's socket is not correctly configured" is the real information that i got from phpmyadmin.

so how to handle the problem?

i have edited "/opt/lampp/var/run/mysql.sock" into my.cnf, php.ini and config.inc.php.

my.cnf:
Code: Select all

[client]
#password   = your_password
port      = 3306
socket      = /opt/lampp/var/run/mysql.sock
[mysqld_safe]
socket      = /opt/lampp/var/run/mysql.sock
nice      = 0

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port      = 3306
socket      = /opt/lampp/var/run/mysql.sock
user      = mysql
pid-file   = /opt/lampp/var/run/mysql.pid
basedir      = /opt/lampp
datadir      = /opt/lampp/var/mysql
tmpdir      = /opt/lampp/tmp


php.ini:

Code: Select all
mysql.default_socket ="/opt/lampp/var/run/mysql.sock"


config.inc.php
Code: Select all
$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '/opt/lampp/var/run/mysql.sock';   


but when i restart lampp, the proble is still here[

PostPosted: 08. August 2006 17:16
by Wiedmann
i have edited "/opt/lampp/var/run/mysql.sock" into my.cnf, php.ini and config.inc.php.

What does
Code: Select all
ps -ef | grep mysqld

tell you now?

it told me:

PostPosted: 08. August 2006 17:32
by liu
it told me like this:
Code: Select all
root@BioInfoServ:/home/biowee# cd /
root@BioInfoServ:/# ps -ef | grep mysqld
root     17396     1  0 Aug09 pts/1    00:00:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/opt/lampp/var/run/mysqld.pid
mysql    17468 17396  0 Aug09 pts/1    00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --user=mysql --pid-file=/opt/lampp/var/run/mysqld.pid --skip-locking --port=3306 --socket=/opt/lampp/var/run/mysqld.sock
root     31251 17194  0 00:31 pts/1    00:00:00 grep mysqld


and i wondered that when i restarted lampp, why it told me like this:

Code: Select all
...
XAMPP: Another MySQL daemon is already running.
...

PostPosted: 08. August 2006 17:48
by Wiedmann
i have edited "/opt/lampp/var/run/mysql.sock" into my.cnf, php.ini and config.inc.php.

it told me like this:
mysql 17468 17396 0 Aug09 pts/1 00:00:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --user=mysql --pid-file=/opt/lampp/var/run/mysqld.pid --skip-locking --port=3306 --socket=/opt/lampp/var/run/mysqld.sock

You see, MySQL is allways using "/opt/lampp/var/run/mysqld.sock" and not "/opt/lampp/var/run/mysql.sock".

Better change all configs to "/opt/lampp/var/run/mysqld.sock"

thanks

PostPosted: 08. August 2006 17:56
by liu
let me try it again. but it can not work well, the proble still here

now mysql started correctly

PostPosted: 09. August 2006 09:29
by liu
after edit "/opt/lampp/var/run/mysqld.sock" into my.cnf, php.ini and config.inc.php, and restart ampp:
Code: Select all
# /opt/lampp/lampp restart

if you find "XAMPP: Another MySQL daemon is already running. ", please stop mysql and lampp:
Code: Select all
# /opt/lampp/lampp mysqlstop
# /opt/lampp/lampp stop

then, test it as user=msql to activate mysql
Code: Select all
#/opt/lampp/sbin/mysqld --user=mysql

then check mysql service:
Code: Select all
#ps -ef | grep mysqld

it should tell us like this:
Code: Select all
mysql    12764     1  0 15:16 ?        00:00:00 /opt/lampp/sbin/mysqld --user=my sql
root     13065 12981  0 15:24 pts/1    00:00:00 grep mysqld

but, if you can not stop lampp, please reboot your system, then start mysql alone:
Code: Select all
# /opt/lampp/lampp startmysql
XAMPP: Starting MySQL...


if you retrived it as followings:
Code: Select all
root@BioInfoServ:/home/biowee# Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored
Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored
Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored
Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored

you would chmod my.cnf:
Code: Select all
chmod 644 /opt/lampp/etc/my.cnf

now resart your lampp, mysql is right there

reference:
http://community.apachefriends.org/f/viewtopic.php?t=1232&sid=2cf844367a722e36b580bafa61a5ae77