Cannot set root password in mysql 5.5.9

Hi there. I installed mysql server from ports when I tried to set the root password I get the following message:
Code:
# mysqladmin -u root password <pasw>
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!
How can I check if MySQL is running? How can I check if /tmp/mysql.sock exists?

Thanks.
 
[cmd=]service mysql-server status[/cmd] or [cmd=]ps ax | grep -i mysql[/cmd]

[cmd=]ls -al /tmp/mysql.sock[/cmd]
 
Something is wrong with mysql. I tried to start
Code:
# service mysql-server start
Starting mysql.
# service mysql-server status
mysql is not running.
# ps ax | grep -i mysql
56552   0  S+     0:00.00 grep -i mysql
and the /tmp/mysql.sock doesn't exist.
How can I get up and running mysql?
thanks
 
Look in the error log of MySQL, I'm sure the reason why it failed to start is in there.
 
Otherwise start MySQL like this:

[cmd=]sh -x /usr/local/etc/rc.d/mysql-server start[/cmd]
or for maximum verbosity:
[cmd=]sh -xv /usr/local/etc/rc.d/mysql-server start[/cmd]

Watch every line of output carefully. You should be able to see where it bombs.
 
Back
Top