Wednesday, March 11, 2020

How to start/stop mysql server


nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-03-11 16:08:37 IST; 27min ago
 Main PID: 7981 (mysqld)
    Tasks: 27 (limit: 3227)
   CGroup: /system.slice/mysql.service
           └─7981 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Mar 11 16:08:36 nagaraju systemd[1]: Starting MySQL Community Server...
Mar 11 16:08:37 nagaraju systemd[1]: Started MySQL Community Server.
nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ service mysql stop
nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2020-03-11 16:36:35 IST; 7s ago
 Main PID: 7981 (code=exited, status=0/SUCCESS)

Mar 11 16:08:36 nagaraju systemd[1]: Starting MySQL Community Server...
Mar 11 16:08:37 nagaraju systemd[1]: Started MySQL Community Server.
Mar 11 16:36:33 nagaraju systemd[1]: Stopping MySQL Community Server...
Mar 11 16:36:35 nagaraju systemd[1]: Stopped MySQL Community Server.
nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ service mysql start
nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-03-11 16:37:00 IST; 5s ago
  Process: 9596 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
  Process: 9587 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 9598 (mysqld)
    Tasks: 27 (limit: 3227)
   CGroup: /system.slice/mysql.service
           └─9598 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Mar 11 16:36:57 nagaraju systemd[1]: Starting MySQL Community Server...
Mar 11 16:37:00 nagaraju systemd[1]: Started MySQL Community Server.
nagaraju@nagaraju:/usr/local/softwares/apache-hive-2.3.6-bin/bin$ 

 

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...