Re: Best method for stopping/starting MySQL?
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
>
>
>
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
how about:
"/etc/init.d/mysql stop" to stop it
and "/etc/init.d/mysql" start to restart it
Reply to: