Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ed 07

macrumors newbie
Original poster
Feb 21, 2007
4
0
Trying to get mysql prompt on my termial window.
<computer name>:~ ClareD$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Password:
Starting MySQL database server
So seemed to work ok there - so presume it's downloaded correctly
Then typed
<computer name>:~ ClareD$ sudo /ClareD/local/mysql/bin/mysql -u root
sudo: /ClareD/local/mysql/bin/mysql: command not found
usr=ClareD is that correct??
As you may be aware I'm a total beginner, have searched the net, dowloaded tutorials and manual's so any help would be sincerely greatly apreciated.
i'm working on a macbook version 10.4.8 and have installed mysql standard 5.0.27.
Cheers
 

pengu

macrumors 6502a
Mar 20, 2005
575
0
Diddily Daddily...
/usr/ is a directory, it does not actually relate to your username. so you need to run /usr/local/mysql/bin/mysql -u root -p

without the -p switch you wont be prompted for a password.
 

ed 07

macrumors newbie
Original poster
Feb 21, 2007
4
0
mysql prompt

hey cheers that explains alot but tried entering new command and now getting a different error
<computer name>:~ ClareD$ sudo /usr/local/mysql/bin/mysql -u root -p
Password:
/usr/local/mysql/bin/mysql: /usr/local/mysql/bin/mysql: cannot execute binary file
clare-duggans-computer:~ ClareD$

Any ideas??
 

pengu

macrumors 6502a
Mar 20, 2005
575
0
Diddily Daddily...
um. cant say i've had that before. a quick google came up with a few possibilities:

  1. It's a corrupt file, and needs to be re-downloaded and/or installed
  2. Its built for the wrong architecture (ie, an Intel build, on a PPC mac)
  3. Space monsters have convinced Steven P Jobs that you are not worthy of mysql. lol.
 

ed 07

macrumors newbie
Original poster
Feb 21, 2007
4
0
mysql prompt

hey, downloaded mysql file and installed it again.
New error message now appearing as below
<computer name>:~ ClareD$ sudo /usr/local/mysql/bin/mysql -u root -pEnter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

Could really do with some help if you have any ideas how to get this resolved
Cheers
 

beefy23

macrumors member
Feb 13, 2007
41
0
hey, downloaded mysql file and installed it again.
New error message now appearing as below
<computer name>:~ ClareD$ sudo /usr/local/mysql/bin/mysql -u root -pEnter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

Could really do with some help if you have any ideas how to get this resolved
Cheers

it looks like the mysql server may not be running i.e. it's not started listening for connections. Yous should be able to start it by typing sudo /usr/local/mysql/bin/mysqld &
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Have you started the mysql server? If not try this:-

sudo /usr/local/mysql/bin/safe_mysqld
ctrl-z
bg

That should start the server and put it in the background.

You should then be able to type:-

/usr/local/mysql/bin/mysql mysql --user=root --password=xxxxxx

If that doesn't work you'll need to set the mysql root password. Use mysqladmin to do this.

b e n
 

ed 07

macrumors newbie
Original poster
Feb 21, 2007
4
0
mysql prompt

Hey, cheers for that, I loaded the MySqlStartupItem.pkg and using
"sudu /usr/local/mysql/bin/mysql -u root" and was able to get mysql prompt. Horray!!
BUT when entered -p at end of that statement for password below error is occuring

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Not sure how to set up password??
 

beefy23

macrumors member
Feb 13, 2007
41
0
Hey, cheers for that, I loaded the MySqlStartupItem.pkg and using
"sudu /usr/local/mysql/bin/mysql -u root" and was able to get mysql prompt. Horray!!
BUT when entered -p at end of that statement for password below error is occuring

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Not sure how to set up password??

Try the following Resetting Mysql Permissions
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.