Restarting MariaDB
Restarting MariaDB
Hey,
How can I restart MariaDB on centOS7
With the absolute path? (I cannot find it)
How can I restart MariaDB on centOS7
With the absolute path? (I cannot find it)
Re: Restarting MariaDB
Ignore / Do not copy the # sign when you copy the command.
Start MariaDB / MySQL
Stop MariaDB / MySQL
Restart MariaDB / MySQL
Reload MariaDB / MySQL
Check MariaDB / MySQL Status
Auto Boot MariaDB / MySQL on Boot
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
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
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
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
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
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
Re: Restarting MariaDB
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
The problem when I do this: /etc/init.d/mysql restart
I get this returned
When I try to run this command in monit, I will get this error
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
I get this returned
Code: Select all
-bash: /etc/init.d/mysql: No such file or directory
Code: Select all
systemctl start mariadb
Code: Select all
/etc/monitrc:284: Program does not exist: 'systemctl'