[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best method for stopping/starting MySQL?



Hello Mike,

On 2009-10-19, Mike Ayers wrote:

> On Mon, Oct 19, 2009 at 10:49:36AM -0700, Tim Legg wrote:
>> Hello again!
>> 
>> I would like to shutdown mysql periodically to make backups of the databases.  I would like to know what
>> is the official Debian way of stopping and restarting MySQL.
>
>> 
>> 
>> When I follow the intuitive steps for shutting it down, it doesn't work.
>> 
>> # /etc/init.d/mysql stop
>> Stopping MySQL database server: mysqld failed!
>> 
>> So I investigate further and find that this doesn't work either
>> 
>> # mysqladmin shutdown
>> mysqladmin: connect to server at 'localhost' failed
>> error: 'Access denied for user 'root'@'localhost' (using password: NO)'
>> 
>> I am root and should be able to do anything...
>> 
>> So I do cooperate and provide it a user and password
>> 
>> # mysqladmin -u root -p shutdown 
>> Enter password: 
>> # 
>> 
>> And so it works.  Starting it back up isn't nearly as clean though
>> 
>> # /etc/init.d/mysql start
>> Starting MySQL database server: mysqld.
>> Checking for corrupt, not cleanly closed and upgrade needing tables..
>> /usr/bin/mysqladmin: connect to server at 'localhost' failed
>> error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
>> ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
>> 
>> So, I choose to reboot the system instead.  Is there a better way?
>> 
>> Tim Legg
>> 
> how about:
> "/etc/init.d/mysql stop"  to stop it
> and "/etc/init.d/mysql" start  to restart it
>
You did read the message from the OP that You quoted in Your mail (see above),
did You?
It clearly states that what You suggest does not work for him.

Regards,
-- 
Christer
Email: coldhoff@swipnet.se


Reply to: