WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: stopping mysqld on bot  (Read 2507 times)

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
stopping mysqld on bot
« on: July 14, 2012, 05:33:10 AM »
Hi, I have installed php5 (ver 5.3.3) "on bot" and i have always /usr/local/libexec/mysqld --based running, is possible avoid  to load mysql  when tiny core start, because i only need php5 and mysql use a lot of memory.

Thanks Luca

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: stopping mysqld on bot
« Reply #1 on: July 14, 2012, 05:55:39 AM »
The mysql startup script starts it. You'd need to edit that, or kill it in bootlocal.sh.
The only barriers that can stop you are the ones you create yourself.

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
Re: stopping mysqld on bot
« Reply #2 on: July 14, 2012, 10:21:21 AM »
HI curaga, i try to do as suggested in an old post adding
mysqladmin --user=root shutdowng
to /opt/bootlocal.sh but the command was rejected.
I look for mysql startup script in /etc/init.d/ services and in /usr/local/etc/init.d/services but it wasn't  there, there is a file my.cnf referred to mysql in /usr/local/etc.

Thanks Luca
« Last Edit: July 14, 2012, 10:23:42 AM by wolf_core »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: stopping mysqld on bot
« Reply #3 on: July 14, 2012, 02:50:01 PM »
/usr/local/tce.installed/mysql inside mysql.tcz.
The only barriers that can stop you are the ones you create yourself.

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
Re: stopping mysqld on bot
« Reply #4 on: July 15, 2012, 11:53:50 AM »
Hi curaga, modify a tcz is to difficult for me  :'( . If i run from console
Code: [Select]
sudo mysqladmin shutdown  all sql process were killed, so i try to added this command to /opt/bootlocal.sh with and without sudo but there are an error and mysql process runs.

Thanks in advance Luca

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: stopping mysqld on bot
« Reply #5 on: July 15, 2012, 04:52:06 PM »
Hi wolf_core
When someone looking for help states that there is an error, it's customary to share what the error is.
My guess is that mysql has not yet started when the shutdown command executes, of course, that's
just a guess.

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
Re: stopping mysqld on bot
« Reply #6 on: July 16, 2012, 05:50:31 AM »
Hi Rich, the error is shown on system startup before the graphic gui start only for a second, so i can't read it  . Damn I can read it on system boot log  :-[  when i come home from office i can post it.

Thanks Luca
« Last Edit: July 16, 2012, 05:56:27 AM by wolf_core »

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
Re: stopping mysqld on bot
« Reply #7 on: July 16, 2012, 03:30:16 PM »
If i run from console
Code: [Select]
tc@box:/$ sudo mysqladmin shutdownall sql process were killed; so i copy the command in /opt/bootlocal.sh with and without sudo but there is the error

mysqladmin: shutdown failed; error: 'Access denied'; you need the shutdown PRIVILEGE for this operation

Thanks Luca

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: stopping mysqld on bot
« Reply #8 on: July 16, 2012, 04:36:20 PM »
Hi wolf_core
The bootlocal script runs a s root, so I would think it should adequate permission to perform that operation.
Out of curiosity, what happens if you execute  sudo mysqladmin shutdown  a second time after you've shut it
down from the command line? What message does it give then?

Offline wolf_core

  • Jr. Member
  • **
  • Posts: 69
Re: stopping mysqld on bot
« Reply #9 on: July 17, 2012, 03:07:40 PM »
Hi Rich,  if i run the command twice it say

Code: [Select]
tc@box:/$ sudo mysqladmin shutdown
tc@box:/$
tc@box:/$ sudo mysqladmin shutdown
tc@box:/$ mysqladmin: connect to server at 'localhost' failed  error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check mysql is running and then the socket '/tmp/mysql.sock' exists!
tc@box:/$

Thanks Luca

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: stopping mysqld on bot
« Reply #10 on: July 17, 2012, 05:10:52 PM »
Hi wolf_core
OK, I just wanted to be sure the shutdown command wasn't spitting out some bogus error message when it was
run from bootlocal.sh. It looks like it might really be a permission problem, though I'm at a loss to explain it.