mysql on lampp can't be activated in any way

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mysql on lampp can't be activated in any way

Postby liu » 08. August 2006 15:11

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?
liu
 
Posts: 6
Joined: 08. August 2006 11:03

Postby Wiedmann » 08. August 2006 15:25

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'
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

i am sorry to paste it wrong

Postby liu » 08. August 2006 16:13

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?
liu
 
Posts: 6
Joined: 08. August 2006 11:03

Postby Wiedmann » 08. August 2006 16:40

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?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

i posted it wrong

Postby liu » 08. August 2006 16:57

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[
liu
 
Posts: 6
Joined: 08. August 2006 11:03

Postby Wiedmann » 08. August 2006 17:16

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?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

it told me:

Postby liu » 08. August 2006 17:32

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.
...
liu
 
Posts: 6
Joined: 08. August 2006 11:03

Postby Wiedmann » 08. August 2006 17:48

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"
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

thanks

Postby liu » 08. August 2006 17:56

let me try it again. but it can not work well, the proble still here
liu
 
Posts: 6
Joined: 08. August 2006 11:03

now mysql started correctly

Postby liu » 09. August 2006 09:29

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
liu
 
Posts: 6
Joined: 08. August 2006 11:03


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 8 guests