I do the
sh-3.2# find ~ -name mysql.sock on my home directory,
find . -name mysql.sock in the /usr/local directory and,
find / -name mysql.sock and don't get a response.
I haven't gotten the mysqld started once from the installation.
I removed the other installations.
MY.CONF:
[client]
socket=/var/mysql/mysql.sock
PHP.INI
; Default socket name for local MySQL connects. If empty, uses the
built-in
; MySQL defaults.
mysql.default_socket = /var/mysql/mysql.sock
The entire MY.CONF
[mysqld]
#Path to installation directory. All paths are usually resolved
relative to this.
basedir=/usr/local/mysql-5.1.40-osx10.5-powerpc/bin/
#Path to the database root
datadir=/usr/local/mysql-5.1.40-osx10.5-powerpc/data
#Path to the temporary directory.
tmpdir=/private/tmp
#The size of the buffer used for index blocks. Increase this to get
better index handling (for all reads and multiple writes) to as much
as you can afford; 64M on a 256M machine that mainly runs MySQL is
quite common.
key_buffer_size=8192k
#Each thread that needs to do a sort allocates a buffer of this size.
sort_buffer_size=2M
#If no specific storage engine/table type is defined in an SQL-Create
statement the default type will be used.
default-storage-engine=myisam
[client]
socket=/var/mysql/mysql.sock
Why does it think there are two mysql.sock?
thanks,
Maybe I was doing it as the wrong user? I did this and got a
different message.
sh-3.2# ./bin/mysqld --user=_mysql
091228 16:50:37 [ERROR] Can't find messagefile '/usr/local/
mysql-5.1.40-osx10.5-powerpc/bin/share/english/errmsg.sys'
091228 16:50:37 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc/data/ is case
insensitive
091228 16:50:37 [Note] Plugin 'FEDERATED' is disabled.
./bin/mysqld: Unknown error 1146
091228 16:50:37 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
091228 16:50:38 InnoDB: Started; log sequence number 0 44233
091228 16:50:38 [ERROR] Aborting
091228 16:50:38 InnoDB: Starting shutdown...
091228 16:50:39 InnoDB: Shutdown completed; log sequence number 0
44233
091228 16:50:39 [Note]
What is the mysql_update and the federated plugin?
Where are you starting the server? "mysql" including
"/usr/local/mysql/bin/mysql" are the CLIENT. "mysqld" (and its assorted
wrappers including mysqld_safe) are the server. Need both.
--
86. I will make sure that my doomsday device is up to code and properly
grounded.
--Peter Anspach's list of things to do as an Evil Overlord
Well I might have started the server. Thanks
jlrough$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Password:
Starting MySQL database server
however, to double-check I did ps aux | grep mysql to see if it
started a process and I didn't see any mysql processes?
MySQLAdmin connection dialog said starting database server and I
didn't get an error message but that is the startup item alias . I
did open MySQLAdministrator to see if I had a MySQL instance and it
said could not connect however it tried to connect to the old socket
in /tmp/mysql.sock . the exact message is
"Could not connect to MySQL instance at localhost. Canot connect to
local mysql server through socket 'tmp/mysql.sock(2)"
How can I tell if a old mysql.sock is in /tmp/mysql.sock
I tried mysqld and got the message above:
sh-3.2# /usr/local/mysql/bin/mysqld
091228 18:01:29 [ERROR] Can't find messagefile '/usr/local/
mysql-5.1.40-osx10.5-powerpc/bin/share/english/errmsg.sys'
091228 18:01:29 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc/data/ is case
insensitive
091228 18:01:29 [ERROR] Fatal error: Please read "Security" section of
the manual to find out how to run mysqld as root!
091228 18:01:29 [ERROR] Aborting
091228 18:01:29 [Note]
sh-3.2#
When I start mysqld it seems to die.
sh-3.2# ./bin/mysqld_safe &
[1] 1722
sh-3.2# 091228 18:03:05 mysqld_safe Logging to '/usr/local/
mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-
g5.local.err'.
091228 18:03:06 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc/data
091228 18:03:07 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-g5.local.pid
ended
thanks,
What am I looking for? In /private/tmp there is no mysql.sock. No
hidden files nothing.
Yup. It started and kersploded.
> sh-3.2# ./bin/mysqld_safe &
> [1] 1722
> sh-3.2# 091228 18:03:05 mysqld_safe Logging to '/usr/local/
> mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-
> g5.local.err'.
> 091228 18:03:06 mysqld_safe Starting mysqld daemon with databases
> from /usr/local/mysql-5.1.40-osx10.5-powerpc/data
> 091228 18:03:07 mysqld_safe mysqld from pid file /usr/local/
> mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-g5.local.pid
> ended
This is a separate run. What does the error log say THIS time? (If you don't
know where it logs, specify temporarily with --log-error=/path/to/file
on the mysqld_safe.
> thanks,
>
> What am I looking for? In /private/tmp there is no mysql.sock. No
> hidden files nothing.
It ain't gonna be there. Both the server and client are configured (per
your first post) to look in /var/mysql/mysql.sock for the socket.
--
"Doesn't everybody?" is a question that never expects an answer of "No."
I believe this is the error log. It looks like the output of a
previous message but I checked the time of the log.
091228 20:03:39 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc/data
091228 20:03:39 [ERROR] Can't find messagefile '/usr/local/
mysql-5.1.40-osx10.5-powerpc/bin/share/english/errmsg.sys'
091228 20:03:39 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc/data/ is case
insensitive
091228 20:03:39 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Unknown error 1146
091228 20:03:39 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
091228 20:03:39 InnoDB: Started; log sequence number 0 44233
091228 20:03:39 [ERROR] Aborting
091228 20:03:39 InnoDB: Starting shutdown...
091228 20:03:40 InnoDB: Shutdown completed; log sequence number 0
44233
091228 20:03:40 [Note]
091228 20:03:41 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-g5.local.pid
ended
~
~
"logs.err" 13L, 959C
> > thanks,
>
> > What am I looking for? In /private/tmp there is no mysql.sock. No
> > hidden files nothing.
>
> It ain't gonna be there. Both the server and client are configured (per
> your first post) to look in /var/mysql/mysql.sock for the socket.
Well the MySQL admin was looking for it in the previous location.
Should I uninstall it or will it find the right one as soon as it is
working. At this point I don't care I just want to get mysql started.
thanks,
Is mysql 5.1.40 built for Innodb engine? That is a guess. In my.conf
it says default type is myisam. Could that cause it to not be able to
find this plug-in or something?
default-storage-engine=myisam
[client]
socket=/var/mysql/mysql.sock
Suggest you take a look at this site- you don't need to compile the
MySQL- but the part about creating a plist is useful.
http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/
I tried to compile from source and it didn't work so I tried the
installer. That didn't work. I only have 32 bit g5 not an Intel
Mac. I don't know if the older machine is an issue. I will try
installing Snow L:eopard on it and see if I can compile from source.
It has been a big pain. Back to square one again. I should have left
Tiger and MySQL on it but I didn't have the command line. The Mac
preinstalled version of mysql doesn't have the command line.
that is the mac version of MySQL on Leopard which wrote over the
version that worked on Tiger.
1) There are no such thing as 32-bit G5 processor. If you have a G5,
then it's a 64-bit. If you meant G4, then that's what you have. Double
check this to be sure you're using the right bit-size.
2) You can't install Snow Leopard on a PPC machine. It's intel-only.
3) Is there a reason for compiling from source? You should be able to
use the binary. Leopard has changed the way MySQL starts up and hence
requires the plist fix I linked you to.
> I only have 32 bit g5
No such animal - G5s are 64-bit.
> I don't know if the older machine is an issue.
It's not. I'm running the latest MySQL on a ten year old G4.
> I will try installing Snow Leopard on it
Snow Leopard requires an Intel Mac.
> The Mac
> preinstalled version of mysql doesn't have the command line.
If you're referring to Mac OS X Server, yes it does. It's not in your
default PATH, but it's there.
sherm--
Well I didn't know the specs on the g5. You might have solved my
problems. I do have an intel macbook pro but don't want to install
mysql server on it for security reasons but I will if I have to.
Thanks though I will give it one more try on the g5.
091229 17:42:41 [Note]
091229 17:42:41 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc/data/janis-roughs-power-mac-g5.local.pid
ended
Who should the data directory be owned by? I have it owned by mysql
user. I tried starting mysqld_safe as root and as mysql to see if it
made a difference and I got the same errors.
please help
Do you have tiger or leopard on your g4? I had tiger working. I
think I had Leopard working without the command line. Now nothing
works. I think it was the preinstalled mysql version that comes with
Leopard.
> I got this in the error log:
> 91229 17:42:41 mysqld_safe Starting mysqld daemon with databases from /
> usr/local/mysql-5.1.40-osx10.5-powerpc/data
> 091229 17:42:41 [ERROR] Can't find messagefile '/usr/local/
> mysql-5.1.40-osx10.5-powerpc/bin/share/english/errmsg.sys'
Does /usr/local/mysql-5.1.40-osx10.5-powerpc/ exist? If not, and if
/usr/local/mysql/ *does*, then a symlink should fix things up:
cd /usr/local
sudo ln -s ./mysql ./mysql-5.1.40-osx10.5-powerpc
I've seen this kind of problem before on Mac OS X versions of MySQL,
where the MySQL tools were configured to use the longer path, but the
installer package placed files in /usr/local/mysql instead.
sherm--
> On Dec 29, 1:16�pm, Sherm Pendley <spamt...@shermpendley.com> wrote:
>> JRough <jlro...@yahoo.com> writes:
>> > I only have 32 bit g5
>>
>> No such animal - G5s are 64-bit.
>>
>> > I don't know if the older machine is an issue.
>>
>> It's not. I'm running the latest MySQL on a ten year old G4.
>>
>> > I will try installing Snow Leopard on it
>>
>> Snow Leopard requires an Intel Mac.
>>
>> > The Mac
>> > preinstalled version of mysql doesn't have the command line.
>>
>> If you're referring to Mac OS X Server, yes it does. It's not in your
>> default PATH, but it's there.
>
> Do you have tiger or leopard on your g4?
Leopard, although I've had MySQL working on it since the 4th Developer
Preview release of Mac OS X 10.0. You kids today have it easy - in MY
day we had to edit the source code just to get it to compile! Grumble,
grumble, uphill both ways, grumble... :-)
> I think it was the preinstalled mysql version that comes with
> Leopard.
Only Mac OS X Server includes MySQL. If you don't have Server, it wasn't
preinstalled.
sherm--
> I tried reinstalling from the package file.
*What* package file? Did you download it from mysql.com?
> 091229 17:42:41 [ERROR] Can't find messagefile '/usr/local/
> mysql-5.1.40-osx10.5-powerpc/bin/share/english/errmsg.sys'
That's bizarre. It should be looking for share/english/errmsg.sys here,
not bin/share/english/errmsg.sys. The required file is in the package
I just now downloaded from mysql.com, and installed to the correct
spot, but mysqld is looking in the wrong place for it.
sherm--
Okay, earlier in the thread you posted a my.conf that includes this:
#Path to installation directory. All paths are usually resolved
#relative to this.
basedir=/usr/local/mysql-5.1.40-osx10.5-powerpc/bin/
Notice what it says in the comment? When mysqld is starting up, it's
looking for share/english/errmsg.sys *relative to the basedir* - that's
where the incorrect bin/ is coming from.
sherm--
Okay, thanks, very much I forgot to change my.conf. I took out the
extra bin and I changed the directory name to match the new install
pkg. Thankfully it is not saying a missing federated plug-in or can't
find the mysql.sock anymore :-)
Is it working? I didn't start with mysql user but I guess it
started that way on its own?
sh-3.2# ps aux | grep mysql
_mysql 64825 9.4 0.0 75944 744 ?? Rs 10:20AM
0:00.03 /bin/sh /usr/local/mysql/bin/mysqld_safe
_mysql 63487 0.0 0.0 75488 476 ?? Ss 10:18AM
0:00.05 /sbin/launchd
One last problem. I can't get mysqladmin to run.
/usr/local/mysql/bin/mysqladmin
gets a canned man page.
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client..............etc etc
Why doesn't mysqladmin CLI work? I can't get it to connect with the
MySQL Administrator app either. Is this something to do with
[client] in my.conf? What do I put in there? Is that why it doesn't
work?
thanks again,
If you can connect via mysql client, then it's working.
> One last problem. I can't get mysqladmin to run.
> /usr/local/mysql/bin/mysqladmin
> gets a canned man page.
Pretty sure that mysqladmin isn't interactive- you should pass in
commands & options and it'd do stuff. If you want interactive session,
use mysql client, or GUI tool.
> JRough wrote:
>> Is it working?
>
> If you can connect via mysql client, then it's working.
Yep. The absence of any error messages is a good sign though!
>> One last problem. I can't get mysqladmin to run.
>> /usr/local/mysql/bin/mysqladmin
>> gets a canned man page.
>
> Pretty sure that mysqladmin isn't interactive- you should pass in
> commands & options and it'd do stuff.
You're right, mysqladmin isn't an interactive shell. The help page lists
the available commands and options that can be given as arguments when
you run it.
sherm--
I changed my.conf client to
[client]
/tmp/mysql.sock
I tried /usr/local/mysql/bin/mysqladmin -u root
and I just get the mysqladmin man page.
How do I ping MySQLServer?
thanks,
As explained previously, mysqladmin isn't interactive; you need to pass
in the command... e.g.
mysqladmin ping -u root
(note the ping command being given after the mysqladmin -- read the man
pages to see the rest of option and how it is to be used)
I'm not sure mysql is really running. What is /sbin/launchd for?
There is a mysql process but I don't know if it is the mysqld. :-(
janis-roughs-power-mac-g5:bin jlrough$ !ps
ps aux | grep mysql
_mysql 106 0.0 0.0 75488 476 ?? Ss 12:42PM
0:05.72 /sbin/launchd
I pinged it and got the mysql.sock(2) error. :-(
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!
I tried to start mysqladmin with the socket and that failed. I got
the man page again but it might not be running since I don't think the
demon is running.
/usr/local/mysql/bin/mysqladmin -S -socket=/tmp/mysql.sock
Should I reinstall mysql yet again? That will be painful since I
really don't know what is wrong.
Janis
launchd is Daemon manager for Mac OS X.
> I pinged it and got the mysql.sock(2) error. :-(
> mysqladmin: connect to server at 'localhost' failed
> error: 'Can't connect to local MySQL server through socket '/tmp/
> mysql.sock' (2)'
> Check that mysqld is running and that the socket: '/tmp/mysql.sock'
> exists!
I would want to verify that the mysql.sock is actually in /tmp/ folder.
Depending on how it was installed, it could have been in a different folder.
Alternatively, try this:
mysql -h 127.0.0.1 -u XXXX -p
to coerce connecting to MySQL via TCP/IP instead of socket (which I
prefer for local connection but let's do one thing at a time-- this is
to rule out missing socket file from a server that is not running).
Next point, I _think_ you are supposed to see a mysqld (note the d at
the end). mysql would be just be a client. At least in my top & aux
doesn't list mysql but rather mysqld.
> I tried to start mysqladmin with the socket and that failed. I got
> the man page again but it might not be running since I don't think the
> demon is running.
> /usr/local/mysql/bin/mysqladmin -S -socket=/tmp/mysql.sock
This only will succeed if there is an actual file named mysql.sock
located in the /tmp folder. As explained above, if the installation
configuration is different, it may be actually somewhere else.
The far more likely answer is that the mysql isn't up and running.
How did you start the server? Manually or automatically as a part of
startup?
> Should I reinstall mysql yet again? That will be painful since I
> really don't know what is wrong.
> Janis
I don't think so. See the above for possible troubleshooting steps.
> to coerce connecting to MySQL via TCP/IP instead of socket (which I
> prefer for local connection but let's do one thing at a time-- this is
> to rule out missing socket file from a server that is not running).
>
> Next point, I _think_ you are supposed to see a mysqld (note the d at
> the end). mysql would be just be a client. At least in my top & aux
> doesn't list mysql but rather mysqld.
>
> > I tried to start mysqladmin with the socket and that failed. I got
> > the man page again but it might not be running since I don't think the
> > demon is running.
> > /usr/local/mysql/bin/mysqladmin -S -socket=/tmp/mysql.sock
>
> This only will succeed if there is an actual file named mysql.sock
> located in the /tmp folder. As explained above, if the installation
> configuration is different, it may be actually somewhere else.
I don't understand this mysql.sock when does it get installed at start
up or when mysql is installed? Maybe I should change the my.conf and
the php.ini to be /var/msyql/mysql.sock to see if it works. I looked
in there and don't see a file named mysql.sock. I also looked in /
tmp/ and there is no file called mysql.sock.
php.ini:
mysql.default_socket= /tmp/mysql.sock
My.conf :
[client]
socket=/tmp/mysql.sock
> The far more likely answer is that the mysql isn't up and running.
>
> How did you start the server? Manually or automatically as a part of
> startup?
I put the com.mysql.mysqld.plist from HiveLogic in /Library/
LaunchDaemons, http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/
the instructions are for compiled mysql with snow leopard but I only
used the plist instructions:
janis-roughs-power-mac-g5:LaunchDaemons jlrough$ launchctl load -w /
Library/LaunchDaemons/com.mysql.mysqld.plist
janis-roughs-power-mac-g5:LaunchDaemons jlrough$ mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
janis-roughs-power-mac-g5:LaunchDaemons jlrough$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
janis-roughs-power-mac-g5:LaunchDaemons jlrough$ mysql -u _mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)
That was what the launchd was all about. It was from the plist.
>
> > Should I reinstall mysql yet again? That will be painful since I
> > really don't know what is wrong.
> > Janis
>
> I don't think so. See the above for possible troubleshooting steps.
Thanks,
Okay, this does confirm that MySQL isn't running at all and this isn't a
case of missing socket file or misconfiguration.
> I don't understand this mysql.sock when does it get installed at start
> up or when mysql is installed?
It's just a file that tells the OS where to look for inter-process
communication. UNIX and Unix-like systems uses sockets, which are small
files that points to the memory address of the process for entry points.
Maybe I should change the my.conf and
> the php.ini to be /var/msyql/mysql.sock to see if it works.
No. Your MySQL server is looking in /tmp/mysql.sock so that's where it
expects it to be. If your configuration files already points to
/tmp/mysql.sock, then this is correct.
Apologies if I've missed this but did you already try running
mysqld_safe? Furthermore, did you do this as an administrator?
For example, I usually do this:
su admin -c 'sudo /usr/local/mysql/bin/mysqld_safe'
where 'admin' is my Administrator account's short name. Your
administrator account may be named differently, so change that
accordingly. You would then enter the administrator's password twice
(yes, twice). See if this succeed, then we can move further in fixing
the startup issues.
I couldn't su as admin and start it for some reason. presumably
because I have to set the grant tables. I tried to start it as mysql
and I tried to start it as root. I couldn't find a mysqld process.
Starting as root I got the starting message but it doesn't seem to
finish. All the mysql directories are owned by root except for the
data directory is owned by mysql.
h-3.2# /usr/local/mysql/bin/mysqld_safe
091231 14:22:06 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
091231 14:22:06 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
091231 14:22:07 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
sh-3.2# ps aux | grep mysql
_mysql 106 0.0 0.0 75488 476 ?? Ss Wed12PM
0:18.36 /sbin/launchd
root 40913 0.0 0.0 75516 484 s002 S+ 2:23PM 0:00.01
grep mysql
sh-3.2# su admin -c 'sudo /usr/local/mysql/bin/mysqld_safe'
su: unknown login: admin
sh-3.2# su mysql -c 'sudo /usr/local/mysql/bin/mysqld_safe'
sh-3.2# ps aux | grep mysql
_mysql 106 0.0 0.0 75488 476 ?? Ss Wed12PM
0:18.38 /sbin/launchd
thanks,
P.S. I tried it with my User name in system preferences also. I
think that is the short name. Anyway it is the user name and it is
the admin account name as well. I got the same response.
anis-roughs-power-mac-g5:~ jlrough$ su jlrough -c 'sudo /usr/local/
mysql/bin/mysqld_safe'
Password:
Password:
091231 14:38:00 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
091231 14:38:00 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
091231 14:38:00 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
janis-roughs-power-mac-g5:~ jlrough$ ps aux | grep mysql
_mysql 106 0.0 0.0 75488 476 ?? Ss Wed12PM
0:18.59 /sbin/launchd
janis-roughs-power-mac-g5:~ jlrough$
If my short name is in /Users/ then that is the last one I tried.
> 091231 14:38:00 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
> osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
So,
what is in the error file?
R.
100104 20:20:27 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100104 20:20:27 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/ is
case insensitive
100104 20:20:27 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/bin/mysqld: Table
'mysql.plugin' doesn't exist
100104 20:20:27 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
InnoDB: Log scan progressed past the checkpoint lsn 0 37356
100104 20:20:27 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the
doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 44233
100104 20:20:28 InnoDB: Starting an apply batch of log records to the
database...
InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
100104 20:20:28 InnoDB: Started; log sequence number 0 44233
100104 20:20:28 [ERROR] Fatal error: Can't open and lock privilege
tables: Table 'mysql.host' doesn't exist
100104 20:20:28 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
janis-roughs-power-mac-g5:mysql jlrough$ /usr/local/mysql/bin/
mysqld_safe --user=_mysql with --log-error=/Library/Logs/mysql.err
100104 21:46:58 mysqld_safe Logging to '/Library/Logs/mysql.err'.
chown: /Library/Logs/mysql.err: Operation not permitted
100104 21:46:58 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
rm: /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-
power-mac-g5.local.pid: Permission denied
100104 21:46:58 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
janis-roughs-power-mac-g5:mysql jlrough$
THIS IS MYSQL.err:
100104 21:46:58 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100104 21:46:58 [Warning] Can't create test file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.lower-test
100104 21:46:58 [Warning] Can't create test file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.lower-test
^G/usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/' (Errcode: 13)
100104 21:46:58 [ERROR] Aborting
100104 21:46:58 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
100104 21:46:58 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
~
When I just start as _mysql user without redirecting the error log to /
Library/Logs I get another error in the data directory which belongs
to _mysql user
-bash: /usr/local/mysql/bin/msyqld_safe: No such file or directory
janis-roughs-power-mac-g5:mysql jlrough$ /usr/local/mysql/bin/
mysqld_safe --user=_mysql
100104 22:08:04 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
touch: /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-
power-mac-g5.local.err: Permission denied
chown: /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-
power-mac-g5.local.err: Permission denied
100104 22:08:04 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
/usr/local/mysql/bin/mysqld_safe: line 100: /usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err:
Permission denied
rm: /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-
power-mac-g5.local.pid: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 137: /usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err:
Permission denied
100104 22:08:04 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
/usr/local/mysql/bin/mysqld_safe: line 100: /usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err:
Permission denied
janis-roughs-power-mac-g5:mysql jlrough$
So I don't know what I am supposed to change the owner as?
total 146400
drwxr-x--- 9 _mysql wheel 306 Jan 4 21:45 .
drwxr-xr-x 17 root wheel 578 Oct 9 08:07 ..
-rw-r----- 1 root wheel 241664 Jan 4 21:38 .janis-roughs-
power-mac-g5.local.err.swp
-rw-rw---- 1 _mysql wheel 5242880 Jan 4 21:37 ib_logfile0
-rw-rw---- 1 _mysql wheel 5242880 Dec 30 09:56 ib_logfile1
-rw-rw---- 1 _mysql wheel 10485760 Jan 4 21:37 ibdata1
-rw-rw---- 1 _mysql wheel 53743106 Jan 4 21:37 janis-roughs-power-
mac-g5.local.err
drwxr-x--- 2 _mysql wheel 68 Oct 9 08:07 mysql
drwxr-x--- 2 _mysql wheel 68 Oct 9 08:07 test
I found the log file ,janis-roughs-power-mac-g5.local.err, here is the
latest entry for today:
100105 17:06:57 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100105 17:06:57 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/ is
case insensitive
100105 17:06:57 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
100105 17:06:57 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
100105 17:06:58 InnoDB: Started; log sequence number 0 44233
100105 17:06:58 [ERROR] Fatal error: Can't open and lock privilege
tables: Table 'mysql.host' doesn't exist
100105 17:06:58 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
100105 17:10:55 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100105 17:10:56 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/ is
case insensitive
100105 17:10:56 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/bin/mysqld: Table
'mysql.plugin' doesn't exist
100105 17:10:56 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
100105 17:10:56 InnoDB: Started; log sequence number 0 44233
100105 17:10:56 [ERROR] Fatal error: Can't open and lock privilege
tables: Table 'mysql.host' doesn't exist
100105 17:10:56 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
~
Here is the startup it with the _mysql user:
sh-3.2# /usr/local/mysql/bin/mysqld_safe --user=_mysql
100105 17:17:29 mysqld_safe Logging to '/usr/local/mysql-5.1.40-
osx10.5-powerpc-64bit/data/janis-roughs-power-mac-g5.local.err'.
100105 17:17:29 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100105 17:17:30 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
sh-3.2#
Here is the log file with the _mysql user:
100105 17:17:29 mysqld_safe Starting mysqld daemon with databases
from /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data
100105 17:17:29 [Warning] Setting lower_case_table_names=2 because
file system for /usr/local/mysql-5.1.40-osx10.5-powerpc-64bit/data/ is
case insensitive
100105 17:17:29 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
100105 17:17:29 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
100105 17:17:30 InnoDB: Started; log sequence number 0 44233
100105 17:17:30 [ERROR] Fatal error: Can't open and lock privilege
tables: Table 'mysql.host' doesn't exist
100105 17:17:30 mysqld_safe mysqld from pid file /usr/local/
mysql-5.1.40-osx10.5-powerpc-64bit/data/janis-roughs-power-mac-
g5.local.pid ended
~