Can't Get MySQL Port Up

Drew Jenkins drewjenkinsjr at yahoo.com
Thu Mar 1 16:33:17 UTC 2007


----- Original Message ----
From: Jeremy Chadwick <koitsu at FreeBSD.org>
To: Drew Jenkins <drewjenkinsjr at yahoo.com>
Cc: freebsd-ports at freebsd.org
Sent: Thursday, March 1, 2007 11:29:26 AM
Subject: Re: Can't Get MySQL Port Up

>The fact that you broke /usr/local/include is probably not a good
>thing either.  

To clarify, I broke it in one server but not the other *and* the problem exists on *both* servers. So I don't believe it's a factor.

>Have you considered doing something like pkg_info,

That command brings up many ports that are not listed in /var/db/ports/*

>making a list of all the packages you have installed, doing
>pkg_delete -a -f && rm -fr /var/db/ports/*

Will that delete *only* the ports listed in /var/db/ports/*, or will that delete *all* the ports listed from pkg_info?

>then reinstalling all of the ports in question?

To be absolutely clear, you mean the ports deleted from /var/db/ports/* only, correct? Easy enough to do.

>Are you _building_ MySQL or are you using the package (pre-compiled
>binary package)?  What version of MySQL are you choosing to use?

I am using the port: 5.1 server.

>What exactly is in your my.cnf?  This looks suspicious.

Um...dunno. I just ran a find for "*.cnf" and up popped three files (small, med, large) like this:
/usr/local/share/mysql/my-small.cnf
I decided to copy this over to /etc/my.cnf. I left the defaults. I didn't edit it. I ran mysqld_safe again, but got the same errors.

>There is no such table "general_log" in database "mysql" in MySQL
>4.0 nor 4.1.  errno 13 is Permission denied, by the way.  So how is
>this table getting loaded?

No idea. Didn't use any beta.

> 070301  6:58:39 [ERROR] /usr/local/libexec/mysqld: Can't create/write to file '/var/db/mysql/server312.web.vi.pid' (Errcode:
> 13)

This also looks indicative of a permissions problem with your
/var/db/mysql directory.  The directory should be identical in
ownership and permissions to this:

drwx------    7 mysql     mysql     512 26 Feb 09:46 /var/db/mysql/

Strange. I know I changed that once, but the ownership was wrong. Fixed that and the folder contents as well. However, the permissions read:

drwxr-xr-x

I don't imagine that matters for these purposes, but it could invite a hack. How do I change that? I'm used to +x or whatever, but here I need numbers, I guess.
Also, doing that and then running mysqld_safe gave the same error in the error log plus this:

^G/usr/local/libexec/mysqld: Can't find file: './mysql/general_log.frm' (errno: 13)
070301 10:25:13 [ERROR] /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
070301 10:25:13 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
070301 10:25:13  mysqld ended

So, it didn't look for a pid file (nor did it create one), and now it is looking for a host file.

TIA,
Drew




 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097


More information about the freebsd-ports mailing list