레일즈 v2.3 앱을 개발 중입니다. MySQL v5.1을 사용합니다.stop start database
내가 정지 내 레이크 작업 중 하나 시작 MySQL 데이터베이스에 필요하지만, 나는이 일을 구현하는 방법을 잘 모르겠습니다, 어떤 사람은 나를 도울 수 있을까? 그런데
namespace :db do
task :some_db_task => :environment do
#shut down mysql
...
#start mysql
end
end
, 나는
우분투 머신에 개발입니다.
----------------------- 업데이트 --------------------- 을 준수함으로써
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql stop
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop mysql
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.78" (uid=1000 pid=6331 comm="stop) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
나는 또한 명령 행, 동일한 오류 인상에 /etc/init.d/mysql stop
을 시도,
: -------
내가 exec "/etc/init.d/mysql stop"
을 시도, 나는 다음과 같은 오류 메시지를 받았습니다 오류 메시지의 지시에 따라 service mysql stop
을 시도했지만 새로운 오류 메시지가 나타납니다 :
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.79" (uid=1000 pid=6343 comm="stop) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
왜 나는 mysql을 멈출 수 없습니까 ??
--------------- 업데이트 2 -------------------------
위의 오류 메시지가 표시 되더라도 실제로 이 일을 수행했음을 알게되었습니다.. MySQL 은이 명령으로을 중지하고 동시에 메시지를 발생시킵니다.
내 업데이트를 확인해주세요. 이제는 문제가 MySQL을 멈출 수없는 것 같습니다. – Mellon
내 업데이트보기 ^^ – Michael
"sudo service mysql stop"을 실행하기 위해 업데이트를 시도했지만 "중지 : 알 수없는 인스턴스 :"라는 오류 메시지가 나타납니다. " – Mellon