Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

Restarting MariaDB

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
daansk44
Posts: 56
Joined: Tue Sep 06, 2016 7:21 pm

Os: CentOS 6x
Web: apache + nginx
Restarting MariaDB
  • Quote

Post by daansk44 » Mon Sep 10, 2018 11:42 am

Hey,

How can I restart MariaDB on centOS7
With the absolute path? (I cannot find it)
Top

xorro
Posts: 87
Joined: Sun Nov 13, 2016 3:11 pm
Contact:
Contact xorro
Website Skype

Os: CentOS 6x
Web: apache + nginx
Re: Restarting MariaDB
  • Quote

Post by xorro » Mon Sep 10, 2018 4:13 pm

Ignore / Do not copy the # sign when you copy the command.

Start MariaDB / MySQL

Code: Select all

# For Sysvinit Systems #
# service mysql start
or
# /etc/init.d/mysql start

# For Systemd Systems #
# systemctl start mariadb.service
or
# systemctl start mysql.service
or
# systemctl start mariadb
or
# systemctl start mysql
Stop MariaDB / MySQL

Code: Select all

# For Sysvinit Systems #
# service mysql stop
or
# /etc/init.d/mysql stop

# For Systemd Systems #
# systemctl stop mariadb.service
or
# systemctl stop mysql.service
or
# systemctl stop mariadb
or
# systemctl stop mysql
Restart MariaDB / MySQL

Code: Select all

# For Sysvinit Systems #
# service mysql restart
or
# /etc/init.d/mysql restart

# For Systemd Systems #
# systemctl restart mariadb.service
or
# systemctl restart mysql.service
or
# systemctl restart mariadb
or
# systemctl restart mysql
Reload MariaDB / MySQL

Code: Select all

# For Sysvinit Systems #
# service mysql reload
or
# /etc/init.d/mysql reload

# For Systemd Systems #
# systemctl reload mariadb.service
or
# systemctl reload mysql.service
or
# systemctl reload mariadb
or
# systemctl reload mysql
Check MariaDB / MySQL Status

Code: Select all

# For Sysvinit Systems #
# service mysql status
or
# /etc/init.d/mysql status

# For Systemd Systems #
# systemctl status mariadb.service
or
# systemctl status mysql.service
or
# systemctl status mariadb
or
# systemctl status mysql
Auto Boot MariaDB / MySQL on Boot

Code: Select all

# For Sysvinit Systems #
# chkconfig mysqld on

# For Systemd Systems #
# systemctl enable mariadb.service
or
# systemctl enable mysql.service
or
# systemctl enable mariadb
or
# systemctl enable mysql
Top

daansk44
Posts: 56
Joined: Tue Sep 06, 2016 7:21 pm

Os: CentOS 6x
Web: apache + nginx
Re: Restarting MariaDB
  • Quote

Post by daansk44 » Mon Sep 10, 2018 6:06 pm

Thank you for your reply.

The problem is that the mysql server goes down sometimes.
And I want to fix that using monit.
For that I need to have the absolute path of mysql / mariaDB.
But when I use this /etc/init.d/mysqld it cannot be found

Code: Select all

check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group database
start program = "/etc/init.d/mysqld start"
stop program = "/etc/init.d/mysqld stop"
if failed host 127.0.0.1 port 3306 then restart
if 5 restarts within 5 cycles then timeout
The problem when I do this: /etc/init.d/mysql restart
I get this returned

Code: Select all

-bash: /etc/init.d/mysql: No such file or directory
When I try to run this command in monit, I will get this error

Code: Select all

systemctl start mariadb

Code: Select all

/etc/monitrc:284: Program does not exist: 'systemctl'
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password