Page 2 of 11 FirstFirst 1234 ... LastLast
Results 16 to 30 of 153

Thread: How-to Lighttpd, PHP, MySQL and Eaccelerator

  1. #16
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Ok, concerning mysql server i've managed to login to root account and later on into admin account. After restart mysql is working fine and you can both login as admin and as as a root. Next restart brought disappointment i couldn't login to mysql either by root nor admin account (s!c).
    I had that one before...
    I hope you don't installed any databases yet, cos a database rebuild is most likely to fix it

    btw, it seems like your php is not running smoothly?
    my output is this:
    364 ? S 0:21 /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
    369 ? Ss 0:00 \_ /opt/bin/php-fcgi
    413 ? S 0:00 | \_ /opt/bin/php-fcgi
    371 ? Ss 0:00 \_ /opt/bin/php-fcgi
    414 ? S 0:00 | \_ /opt/bin/php-fcgi
    372 ? Ss 0:01 \_ /opt/bin/php-fcgi
    412 ? S 0:03 | \_ /opt/bin/php-fcgi
    373 ? Ss 0:01 \_ /opt/bin/php-fcgi
    415 ? S 3:19 \_ /opt/bin/php-fcgi

  2. #17
    No i didn't it's a dry-run, just to see if it works. I've noticed this but i don't know where's the problem, maybe something is wrong with packages (too much/few). I've onece again started from a scratch and it's not working (i mean fcgi with php and eaccelerator). Maybe a little advise what to install from repo?

  3. #18
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    No i didn't it's a dry-run, just to see if it works. I've noticed this but i don't know where's the problem, maybe something is wrong with packages (too much/few). I've onece again started from a scratch and it's not working (i mean fcgi with php and eaccelerator). Maybe a little advise what to install from repo?
    I actually use the newest versions available, I update every day

    I feel bad its not working out that well, since I use the exact configuration as I worked out here (I made it while installing and testing everything). The only thing I didn't test on the router was mysql in a different user than root.
    For mysql, the easiest fix is most likely to change the system user to root, or use adduser to add a root user to the system
    I'm going to try some things out for mysql tomorrow anyway

  4. #19
    After a long battle i've finally made it thru, eaccelerator (latest one) works like a charm also other components. Only thing that left is to get thru with mysql. I'll digged out some info about configuration and maybe i'll manage Either way this 'how-to' works without probs just need to watch what's going on and try to understand it

  5. #20
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    After a long battle i've finally made it thru, eaccelerator (latest one) works like a charm also other components. Only thing that left is to get thru with mysql. I'll digged out some info about configuration and maybe i'll manage Either way this 'how-to' works without probs just need to watch what's going on and try to understand it
    Good stuff
    now, once again I made mysql work on ubuntu with changing users, and without rebuilding...
    The users could only be switched when the user had enough privileges

    Now I guess "admin" doesn't have enough privileges for some reason.
    one idea is to do this command:
    chown -R admin:admin /opt/var/lib/mysql
    allowing mysql to start under admin username.. most likely

    the other idea is to create a non-loginable user called "root" which can be used for mysql.
    just install adduser:
    ipkg install adduser
    create the root user
    adduser root
    edit root to be non-loginable:
    vi /tmp/etc/passwd
    Change the root line in something like this:

    root:[do not change! password data!]:0:0:root:/:/sbin/nologin
    This last trick actually worked for me when creating an "admin" user since I run everything under root.


    Also, I found out that
    [mysql.server]
    user=admin
    doesn't help when trying to get mysql started
    Last edited by wpte; 31-07-2009 at 21:33.

  6. #21
    Hmm when i've did
    Code:
    chown -R admin:admin /opt/var/lib/mysql
    it gave me error that admin isn't a part of admin group so i did
    Code:
    chown -R admin:root /opt/var/lib/mysql
    and it came without an error (will it work
    Later on i've tried to login using
    Code:
    /opt/bin/mysqladmin -u admin password '********'
    and it gave me this error
    Code:
    /opt/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
    so what now

  7. #22
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Hmm when i've did
    Code:
    chown -R admin:admin /opt/var/lib/mysql
    it gave me error that admin isn't a part of admin group so i did
    Code:
    chown -R admin:root /opt/var/lib/mysql
    and it came without an error (will it work
    Later on i've tried to login using
    Code:
    /opt/bin/mysqladmin -u admin password '********'
    and it gave me this error
    Code:
    /opt/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'
    so what now
    Can you give me an output of:
    cat /tmp/etc/passwd
    maybe the admin user isn't a REAL admin

  8. #23
    Here u go
    Code:
    admin:$1$$iqVIP5rhCc3jLzr8y0h.P/:0:0:root:/usr/local/root:/bin/sh
    nobody:x:99:99:nobody:/:/sbin/nologin

  9. #24
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Here u go
    Code:
    admin:$1$$iqVIP5rhCc3jLzr8y0h.P/:0:0:root:/usr/local/root:/bin/sh
    nobody:x:99:99:nobody:/:/sbin/nologin
    ok... should be good.
    but what if you change everything on that line to admin?
    since I have the line:
    admin:####:0:0:admin:/:/sbin/nologin
    and... mysql starts under that

  10. #25
    Hmm i'm now getting this
    Code:
     221 ?        S      0:00     46   194  3921    88  0.2 /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
      222 ?        Ss     0:00   1099  3285 34410     4  0.0  \_ /opt/bin/php-fcgi
      236 ?        S      0:00      1  3285 34438     4  0.0  |   \_ /opt/bin/php-fcgi
      224 ?        Ss     0:00   1099  3285 34410     4  0.0  \_ /opt/bin/php-fcgi
      239 ?        S      0:00    239  3285 34446  1264  4.1  |   \_ /opt/bin/php-fcgi
      225 ?        Ss     0:00   1099  3285 34410     4  0.0  \_ /opt/bin/php-fcgi
      238 ?        S      0:00    262  3285 34446   128  0.4  |   \_ /opt/bin/php-fcgi
      226 ?        Ss     0:00   1099  3285 34410    12  0.0  \_ /opt/bin/php-fcgi
      237 ?        S      0:00    312  3285 34458   116  0.3      \_ /opt/bin/php-fcgi
      232 ?        S      0:00     25   578  6957  4400 14.5 /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      233 ?        S      0:00      1   578  6957  4400 14.5  \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      234 ?        S     28:11    350   578  6957  4400 14.5      \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
      490 pts/0    S      0:00    103   717  1390   456  1.5 /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/mysql --pid-file=/opt/var/lib/mysql/router.pid
      523 pts/0    S      0:00    598  3107  4236  2568  8.5  \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/var/lib/m
      526 pts/0    S      0:00      0  3107  4236  2568  8.5      \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/var/l
      527 pts/0    S      0:00      2  3107  4236  2568  8.5          \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/v
      668 pts/0    S      0:00    103   717  1390   456  1.5 /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/mysql --pid-file=/opt/var/lib/mysql/router.pid
      701 pts/0    S      0:00    598  3107  4236  2568  8.5  \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/var/lib/m
      702 pts/0    S      0:00      0  3107  4236  2568  8.5      \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/var/l
      703 pts/0    S      0:00      2  3107  4236  2568  8.5          \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=root --pid-file=/opt/v
    and i don't know is this good or what

  11. #26
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    seems like you're running mysql two times here
    btw, I see you switched to root again? or what's happening

    this is mine:
    7963 ? S 0:00 /bin/sh /opt/bin/mysqld_safe --datadir=/opt/var/lib/mysql --pid-file=/opt/var/lib/mysql/wpte.kicks-ass.net.pid
    7996 ? S 0:00 \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/wpte.kicks-ass.net.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
    7997 ? S 0:00 \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/wpte.kicks-ass.net.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
    7998 ? S 0:00 \_ /opt/libexec/mysqld --basedir=/opt --datadir=/opt/var/lib/mysql --user=admin --pid-file=/opt/var/lib/mysql/wpte.kicks-ass.net.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
    so looks quite good I guess

  12. #27
    I've been diggin out some facts about my.cnf and as i understand it's global config file, if you set password there it's inherited by all running mysql servers. Concerning 2 running processes i don't know why it's happening I've looked here, here and here. The databes is run by non-root user (mysql) maybe this would be better way to create such user and run whole server on this account?

  13. #28
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    I've been diggin out some facts about my.cnf and as i understand it's global config file, if you set password there it's inherited by all running mysql servers. Concerning 2 running processes i don't know why it's happening I've looked here, here and here. The databes is run by non-root user (mysql) maybe this would be better way to create such user and run whole server on this account?
    yes true, mysql on normal servers with linux distros like ubuntu run on the mysql account.
    you can try to create a mysql user and try to get it started...
    in the end, mysql should run just fine when the password is set.

  14. #29
    But what could be the reason of two instances of mysql?

  15. #30
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    But what could be the reason of two instances of mysql?
    Maybe when you tried to start mysql, it didn't found a process running already..
    a reboot should give you 1 process tho

Page 2 of 11 FirstFirst 1234 ... LastLast

Similar Threads

  1. Full server config: Samba ftp http xmail mysql forum motor
    By KisVuK in forum WL-500gP Tutorials
    Replies: 14
    Last Post: 15-12-2008, 22:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •