• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Unix command and scripts » How to start and stop mysql on Linux

How to start and stop mysql on Linux

September 8, 2018 by techgoeasy Leave a Comment

MySQL is a open source database widely used in Industry. If the MySQL. is hosted on Linux platform,here are the steps to stop and start the MySQL.

/etc/init.d/mysqld  status

The above gives the status of the mysql service

/etc/init.d/mysqld  stop

The above gives the stop of the mysql service

/etc/init.d/mysqld  start

The above gives the start of the mysql service

/etc/init.d/mysqld  restart

The above gives the stop and start of the mysql service

If you are getting the below error,

0 [Note] mysqld (mysqld 5.6.36) starting as process 1265 …
1265 [ERROR] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!
1265 [ERROR] Aborting
1265 [Note] Binlog end
1265 [Note] mysqld: Shutdown complete

Then you may use the below commands for mysql

service mysqld status

The above gives the status of the mysql service

service mysqld stop

The above gives the stop of the mysql service

service mysqld start

The above gives the start of the mysql service

service mysqld restart

In some platform, you may use this command with

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

On some Linux version(Ubuntu) , following will work

systemctl mysql status
systemctl mysql stop
systemctl mysql start
systemctl mysql restart

Filed Under: Unix command and scripts

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • How to generate sql monitor report in Oracle
  • How to find the long running (longops session) in Oracle
  • How to find concurrent request id from Sid or spid
  • how to check recycle bin in oracle: Purge, enable/disable
  • how to check fra size in oracle: Location, usage, change size

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us