MySQL start - correct path

11 posts / 0 new
Last post
#1 Wed, 05/04/2016 - 03:41
danfolt

MySQL start - correct path

Hi, can somebody tell me how can I find a correct path for MySQL start ? in MySQL configuration page I have this:

                                          System configuration
  • Path to mysqlshow command /usr/bin/mysqlshow
  • Path to mysqladmin command /usr/bin/mysqladmin
  • Path to mysql command /usr/bin/mysql
  • Path to mysqldump command /usr/bin/mysqldump
  • Path to mysqlimport command /usr/bin/mysqlimport
  • MySQL Unix socket /var/lib/mysql/mysql.sock
  • Databases files directory /var/lib/mysql
  • Path to MySQL databases directory /var/lib/mysql

I need to know the correct path in order to automaticaly start the server when the server goes down in Others - System and Server Status Monitor page:

I've tried a lot of paths as: as /var/lib/mysql start or /usr/bin/systemctl mariadb start , but no one works, the system only sends me an email but I have to start it manualy.

Recently I have some problems with Error Establishing a Database Connection and before I will understand which plugin (wordpress) once a week force the server to go down, I want to automaticaly restart it in the moment the webmin sends me an email. I have also installed Virtualmin.

Thank You Daniel

Wed, 05/04/2016 - 06:14
AustinTX

First, try the object returned by the "> which mysql" command.

Wed, 05/04/2016 - 06:32 (Reply to #2)
danfolt

Thanks for your reply, but sorry I am a newbie, can You explain better what You mean by "try object returned by the "> which mysql" command. How can I try it?

Wed, 05/04/2016 - 14:11
AustinTX

Ok, at your command prompt, just type "which mysql" and it will tell you which binary is the one the system uses. It shows the full path to it. "Which" works for many installed programs!

Wed, 05/04/2016 - 14:27
danfolt

Thank You very much, I see now, command shell in webmin says:

which mysql
/bin/mysql

so my path will be
/bin/mysql start ?

Wed, 05/04/2016 - 16:03
andreychek

Howdy,

Hmm, what distro/version is it that you're using there?

I would suggest using the start/stop scripts provided by your distro -- we can help you determine what those would be.

-Eric

Wed, 05/04/2016 - 16:13
danfolt

Hi Eric, I hope that that information You will find here:

Operating system CentOS Linux 7.2.1511
Webmin version 1.791
Virtualmin version 5.02
Kernel and CPU Linux 2.6.32-042stab102.9 on x86_64

Sun, 05/29/2016 - 09:02
danfolt

Anyone can tell me that correct path?
I have also another question, once a week my MySQL goes down, it is probably because of one of my wordpress websites using a lot of plugins, does exists some error logs which could tell me what plugin, file, database error cause database going down? If yes where can I find it?

Sun, 05/29/2016 - 09:13
andreychek

Howdy,

Hmm, I would have expected your above command to work when trying to automatically start MariaDB.

Perhaps you could try this as well:

service mariadb start

If that doesn't work, what error do you receive when trying that?

-Eric

Sun, 05/29/2016 - 16:06
danfolt

thanks Eric I will try it and will let You know here, hopefully I will never need it anymore

Mon, 06/06/2016 - 08:39
danfolt

xandreychek Thank You very much Eric again, your advice to insert service mariadb start

was correct, it works perfectly

Topic locked