Can't start MySQL to init db - Gentoo

Ask questions about your setup or get help installing ZCS server (ZD section below).
fak3r
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

Can't start MySQL to init db - Gentoo

Postby fak3r » Mon Oct 10, 2005 3:20 pm

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:
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
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:


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


14319KevinH
Ambassador
Ambassador
Posts: 4558
Joined: Fri Sep 12, 2014 9:52 pm

Can't start MySQL to init db - Gentoo

Postby 14319KevinH » Mon Oct 10, 2005 6:16 pm

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


'/opt/zimbra/db/mysql.sock'
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

Can't start MySQL to init db - Gentoo

Postby marcmac » Mon Oct 10, 2005 6:29 pm

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.
fak3r
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

Can't start MySQL to init db - Gentoo

Postby fak3r » Mon Oct 10, 2005 8:59 pm

Apparently I didn't have rights correctly set - this fixed it:

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

Return to “Installation and Upgrade”

Who is online

Users browsing this forum: No registered users and 8 guests