Apache Friends Support Forum

It is currently 06. September 2010 02:41

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: mysql on lampp can't be activated in any way
PostPosted: 08. August 2006 15:11 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: 08. August 2006 15:25 
Offline
AF-Moderator

Joined: 01. February 2004 12:38
Posts: 17130
Location: Stuttgart / Germany
See the difference:
Quote:
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


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


Top
 Profile  
 
 Post subject: i am sorry to paste it wrong
PostPosted: 08. August 2006 16:13 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: 08. August 2006 16:40 
Offline
AF-Moderator

Joined: 01. February 2004 12:38
Posts: 17130
Location: Stuttgart / Germany
Quote:
Quote:
2002 - Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock'

should be
Quote:
#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?


Top
 Profile  
 
 Post subject: i posted it wrong
PostPosted: 08. August 2006 16:57 
Offline

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

[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:
mysql.default_socket ="/opt/lampp/var/run/mysql.sock"


config.inc.php
Code:
$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[


Top
 Profile  
 
 Post subject:
PostPosted: 08. August 2006 17:16 
Offline
AF-Moderator

Joined: 01. February 2004 12:38
Posts: 17130
Location: Stuttgart / Germany
Quote:
i have edited "/opt/lampp/var/run/mysql.sock" into my.cnf, php.ini and config.inc.php.

What does
Code:
ps -ef | grep mysqld

tell you now?


Top
 Profile  
 
 Post subject: it told me:
PostPosted: 08. August 2006 17:32 
Offline

Joined: 08. August 2006 11:03
Posts: 6
it told me like this:
Code:
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:
...
XAMPP: Another MySQL daemon is already running.
...


Top
 Profile  
 
 Post subject:
PostPosted: 08. August 2006 17:48 
Offline
AF-Moderator

Joined: 01. February 2004 12:38
Posts: 17130
Location: Stuttgart / Germany
Quote:
Quote:
i have edited "/opt/lampp/var/run/mysql.sock" into my.cnf, php.ini and config.inc.php.

it told me like this:
Quote:
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"


Top
 Profile  
 
 Post subject: thanks
PostPosted: 08. August 2006 17:56 
Offline

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


Top
 Profile  
 
 Post subject: now mysql started correctly
PostPosted: 09. August 2006 09:29 
Offline

Joined: 08. August 2006 11:03
Posts: 6
after edit "/opt/lampp/var/run/mysqld.sock" into my.cnf, php.ini and config.inc.php, and restart ampp:
Code:
# /opt/lampp/lampp restart

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

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

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

it should tell us like this:
Code:
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:
# /opt/lampp/lampp startmysql
XAMPP: Starting MySQL...


if you retrived it as followings:
Code:
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:
chmod 644 /opt/lampp/etc/my.cnf

now resart your lampp, mysql is right there

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group