image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old January 10th, 2004, 05:03 PM
Registered User
 
Join Date: Oct 2003
Location: Rahway, NJ, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thrillseeker TS is on a distinguished road
Exclamation MySQL screwing up!!

I installed MySQL about a month or 2 ago, right after I got Panther, and last night I set up phpBB and made the forums all prettyful. Then I was watching a video that I downloaded, and the WMV file caused my computer to hang. While trying to bring up the Force Quit menu, I accidentally force restarted it. After it rebooted, I wasn't able to go to the boards; there was an error saying it couldn't connect to the MySQL database. I went into Terminal to try and start it up again, but got this error:

Code:
/usr/local/mysql/bin/mysqladmin
/usr/local/mysql/bin/mysqladmin  Ver 8.40 Distrib 4.0.16, for apple-darwin6.6 on powerpc
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: /usr/local/mysql/bin/mysqladmin [OPTIONS] command command....
  {commands not important now}

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- -----------------------------
count                             0
force                             FALSE
compress                          FALSE
character-sets-dir                (No default value)
host                              (No default value)
port                              0
relative                          FALSE
socket                            (No default value)
sleep                             0
user                              (No default value)
verbose                           FALSE
vertical                          FALSE
connect_timeout                   43200
shutdown_timeout                  3600

Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/mysql/data/my.cnf ~/.my.cnf 
The following groups are read: mysqladmin client

{codes taken out}

[Mustang:~] ericpete% /usr/local/mysql/bin/mysql -u root -p
Enter password: 
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Reply With Quote
  #2  
Old January 10th, 2004, 08:55 PM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
Is mysqld running?

Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
  #3  
Old January 10th, 2004, 09:15 PM
Registered User
 
Join Date: Oct 2003
Location: Rahway, NJ, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thrillseeker TS is on a distinguished road
Angry

No, it's not. But every time I go to try and start it up, I get an error saying I don't have permission to do so. I had version 4.0.16, but I upgraded to 4.1.1 about an hour ago to see if it solved the problem. Alas, it did not

[EDIT] Tried it again.

Code:
Last login: Sat Jan 10 20:36:10 on console
Welcome to Darwin!
[Mustang:~] ericpete% /usr/local/mysql/bin/mysqld
/usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 13)
040110 21:20:12  Aborting

040110 21:20:12  /usr/local/mysql/bin/mysqld: Shutdown Complete

[Mustang:~] ericpete% /usr/local/mysql
tcsh: /usr/local/mysql: Permission denied.
[Mustang:~] ericpete% /usr/local/mysql -u root -p
tcsh: /usr/local/mysql: Permission denied.
[Mustang:~] ericpete% /usr/local/mysql/bin/mysqld -u root
/usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 13)
040110 21:21:07  Aborting

040110 21:21:07  /usr/local/mysql/bin/mysqld: Shutdown Complete

Last edited by Thrillseeker TS; January 10th, 2004 at 09:22 PM.
Reply With Quote
  #4  
Old January 10th, 2004, 09:46 PM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
Well, first of all /usr/local/mysql is a directory, and you keep trying to run it as a command. Try this:

Code:
cd /usr/local/mysql
sudo ls bin/mysqld_safe
sudo ./bin/mysqld_safe &
This should start mysqld for you. The first sudo line is just to make sure you are authenticated with sudo so the 2nd one when you run ./bin/mysqld_safe does not ask you for a password again.

Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
  #5  
Old January 10th, 2004, 11:07 PM
Registered User
 
Join Date: Oct 2003
Location: Rahway, NJ, USA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thrillseeker TS is on a distinguished road
Code:
[Mustang:~] ericpete% cd /usr/local/mysql
[Mustang:/usr/local/mysql] ericpete% sudo ls bin/mysqld_safe
bin/mysqld_safe
[Mustang:/usr/local/mysql] ericpete% sudo ./bin/mysqld_safe &
[1] 540
[Mustang:/usr/local/mysql] ericpete% Starting mysqld daemon with databases from /usr/local/mysql/data
040110 23:00:10  mysqld ended
Code:
[Mustang:/usr/local/mysql] ericpete% /usr/local/mysql/bin/mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Reply With Quote
  #6  
Old January 10th, 2004, 11:23 PM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
You need to look in the mysqld log files. Right after mysqld starts, it stops, something should show up in there. they should be in /usr/local/mysql/var.

Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 08:59 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.