how to start stop mysql server

i am using putty to connect to my server and wanted to restart mysql server. searched the internet and found that

command is /etc/init.d/mysqld start or stop

but it did not worked.
then tried /etc/init.d/mysql stop or start

this also did not worked.

i changed some seting in /etc/my.cnf and not i want to restart mysql

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do you try rcmysql start|stop?


VampirD

Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuHC4UACgkQJQ+0ABWtaVlBPQCfTWRhWEELWzqgs1ayXKILY7q3
0lQAoPPkgpCyMvvzaAzmpFZPNE71jE2e
=nGKc
-----END PGP SIGNATURE-----

thanks

i tried /etc/init.d/rcmysql start|stop
but that is also not working

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Usage: /usr/sbin/rcmysql
{start|stop|status|reload|restart|try-restart|force-reload}


VampirD

Microsoft Windows is like air conditioning
Stops working when you open a window.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuHFYYACgkQJQ+0ABWtaVlilwCfSjb0u2GoIh5O3BtQuhjd7ZSl
V/0AoOlgd6dadqZdv07ijFNS6XEDKiRr
=bp7F
-----END PGP SIGNATURE-----

i tried that and got this message.

MySQL manager or server PID file could not be found!

server is running and i can connect to it

thanks

service mysql start
service mysql stop
service mysql restart
service mysql status

Both of those suggestions, rcmysql and service mysql, are exactly equivalent to /etc/init.d/mysql, which is the canonical way (and I don’t mean Ubuntu, I mean the LSB way). In particular rcmysql is just a symlink to /etc/init.d/mysql. You should be focusing on why the init script doesn’t work. I suggest you trace it with:

sh -x /etc/init.d/mysql stop

and see what statements are executed.