Results 1 to 4 of 4

Thread: Can't start MySQL to init db - Gentoo

  1. #1
    Join Date
    Oct 2005
    Location
    Saint Louis, MO
    Posts
    16
    Rep Power
    10

    Default Can't start MySQL to init db - Gentoo

    I've gotten further today with the help of the forums in getting Zimbra up on Gentoo, but am now stuck at running MySQL. I've stopped my 'main' one, renamed /usr/bin/mysql to mysql.old, verified that which MySQL(d) is now the right one:

    Code:
    jorge bin # which mysql
    /opt/zimbra/bin/mysql
    jorge bin # which mysqld
    /opt/zimbra/mysql-standard-4.1.10a-pc-linux-gnu-i686/bin/mysqld
    but when I try to run the Zimbra mySQL I get a perm denied. I'm running this as root, shouldn't it *just work*? What am I doing wrong? Thanks

    Code:
    jorge mysql # cd /opt/zimbra/bin/
    jorge bin # ./mysql.server start
    jorge bin # Starting mysqld daemon with databases from /opt/zimbra/db/data
    STOPPING server from pid file /opt/zimbra/db/mysql.pid
    051010 14:52:17  mysqld ended
    
    jorge bin # cat ../log/mysqld.log
    051010 14:52:17  mysqld started
    /etc/host.conf: line 24: bad command `mdns off'
    051010 14:52:17 [ERROR] Can't start server : Bind on unix socket: Permission denied
    051010 14:52:17 [ERROR] Do you already have another mysqld server running on socket: /opt/zimbra/db/mysql.sock ?
    051010 14:52:17 [ERROR] Aborting
    
    051010 14:52:17 [Note] /opt/zimbra/mysql/bin/mysqld: Shutdown complete
    
    051010 14:52:17  mysqld ended
    jorge bin # ps aux | grep mysql
    jorge bin #

    Also I have run the fixpermissions script in bin, to no avail, then I tried running zmmyinit again, but it failed to set root and zimbra's password since it couldn't start MySQL either:


    Code:
    jorge bin # /opt/zimbra/libexec/zmmyinit
    * Creating required directories
    * Generating mysql config /opt/zimbra/conf/my.cnf
    * Creating database in /opt/zimbra/db/data
    * Starting mysql server
    * Loading schema /opt/zimbra/db/db.sql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/db/mysql.sock' (2)
    * Loading version from /opt/zimbra/db/versions-init.sql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/db/mysql.sock' (2)
    * Setting random password for mysql root user in zimbra local config
    * Setting random password for mysql zimbra user in zimbra local config
    * Changing mysql root user password
    /opt/zimbra/mysql/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/opt/zimbra/db/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/opt/zimbra/db/mysql.sock' exists!
    * Changing mysql zimbra user password
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/db/mysql.sock' (2)
    **** PASSWORD CHANGE FAILED
    jorge bin #
    How can I get MySQL running?

    Thanks

    fak3r

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Does a file call mysql.sock already defined? Is so maybe delete it?


    '/opt/zimbra/db/mysql.sock'

  3. #3
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    14

    Default run as the zimbra user

    You don't have to run mysql as root - it doesn't bind to a privileged port. I'd remove the socket file, then try starting it as the zimbra user.

  4. #4
    Join Date
    Oct 2005
    Location
    Saint Louis, MO
    Posts
    16
    Rep Power
    10

    Default

    Apparently I didn't have rights correctly set - this fixed it:
    Code:
    chown -R zimbra:zimbra /opt/zimbra/db/data
    chmod -R 775 /opt/zimbra/db/data
    Now, is this the right way or wrong way to fix it, since fixpermissions.sh didn't set it like this?

    fak3r

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 06:01 AM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  3. Mysql does not start on RHEL 64
    By cryptogram in forum Installation
    Replies: 11
    Last Post: 01-18-2007, 01:39 PM
  4. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 10:11 PM
  5. No listener on port 7071
    By earthling in forum Installation
    Replies: 3
    Last Post: 11-14-2005, 07:16 AM

Posting Permissions

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