Each distribution comes with a shell script (read as service) to restart / stop / start MySQL server. First login as root user and open shell prompt (command prompt).

First login as root user. Now type the following command as per your Linux distro:

A) If you are using mysql on RedHat Linux (Fedora Core/Cent OS) then use following command:

* To start mysql server:

/etc/init.d/mysqld start

* To stop mysql server:

/etc/init.d/mysqld stop

* To restart mysql server

 /etc/init.d/mysqld restart

Tip: Redhat Linux also supports service command, which can be use to start, restart, stop any service:

# service mysqld start
# service mysqld stop
# service mysqld restart

(B) If you are using mysql on Debian / Ubuntu Linux then use following command:

* To start mysql server:

/etc/init.d/mysql start
another way:service mysql start

* To stop mysql server:

/etc/init.d/mysql stop
another way:service mysql stop

* To restart mysql server

/etc/init.d/mysql restart
another way:service mysql restart

相关文章:

  • 2021-07-15
  • 2021-06-28
  • 2022-01-20
  • 2021-05-25
  • 2021-12-30
  • 2021-08-29
  • 2022-02-21
  • 2022-12-23
猜你喜欢
  • 2021-12-28
  • 2021-12-02
  • 2021-10-25
  • 2021-07-09
  • 2021-09-27
  • 2022-12-23
  • 2022-01-15
相关资源
相似解决方案