在 crouton、ubuntu 上找不到工作 mysql

在 crouton、ubuntu 上找不到工作 mysql

chroot在我的 chromebook 机器上使用 Ubuntu precision。

我正在尝试mysql通过安装apt-get install mysql-server

问题是,当我尝试启动它时,它找不到工作:

(precise)mauriciogior@localhost:~$ sudo start mysql
start: Unknown job: mysql

或者

(precise)mauriciogior@localhost:~$ sudo /etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start
initctl: Unknown job: mysql

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql

或者

(precise)mauriciogior@localhost:~$ sudo service mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start
initctl: Unknown job: mysql

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql

我尝试了网上看到的所有内容,删除了所有相关内容mysql并重新安装。

我尝试使用sudo initctl reload-configuration, 以及这篇文章中的所有内容https://askubuntu.com/questions/296946/upstart-cant-start-mysql

这是我的安装转储:

(precise)mauriciogior@localhost:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  php5-fpm php5-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/26.3 MB of archives.
After this operation, 94.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 14874 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.5.44-0ubuntu0.12.04.1_all.deb) ...
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from .../libmysqlclient18_5.5.44-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_amd64.deb) ...
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from .../mysql-client-core-5.5_5.5.44-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.44-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.44-0ubuntu0.12.04.1_amd64.deb) ...
Setting up mysql-common (5.5.44-0ubuntu0.12.04.1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 15052 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.44-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.44-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for ureadahead ...
Setting up libmysqlclient18 (5.5.44-0ubuntu0.12.04.1) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up mysql-client-core-5.5 (5.5.44-0ubuntu0.12.04.1) ...
Setting up mysql-client-5.5 (5.5.44-0ubuntu0.12.04.1) ...
Setting up mysql-server-core-5.5 (5.5.44-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.44-0ubuntu0.12.04.1) ...
runlevel:/var/run/utmp: No such file or directory
initctl: Unknown job: mysql
150831 19:50:14 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150831 19:50:14 [Note] /usr/sbin/mysqld (mysqld 5.5.44-0ubuntu0.12.04.1) starting as process 13351 ...
Setting up mysql-server (5.5.44-0ubuntu0.12.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

编辑 我尝试创建该文件/var/run/utmp并再次安装...没有成功。

编辑 一些日志:

(precise)mauriciogior@localhost:~$ service --status-all
 [ - ]  bootlogd
 [ ? ]  console-setup
 [ ? ]  cron
 [ ? ]  dmesg
 [ ? ]  hostname
 [ ? ]  hwclock
 [ ? ]  hwclock-save
 [ ? ]  killprocs
 [ ? ]  module-init-tools
 [ ? ]  mysql
 [ ? ]  network-interface
 [ ? ]  network-interface-container
 [ ? ]  network-interface-security
 [ ? ]  networking
 [ - ]  nginx
 [ ? ]  ondemand
 [ ? ]  passwd
 [ - ]  php5-fpm
 [ ? ]  plymouth
 [ ? ]  plymouth-log
 [ ? ]  plymouth-ready
 [ ? ]  plymouth-splash
 [ ? ]  plymouth-stop
 [ ? ]  plymouth-upstart-bridge
 [ ? ]  procps
 [ ? ]  rc.local
 [ ? ]  resolvconf
 [ - ]  rsync
 [ ? ]  rsyslog
 [ ? ]  sendsigs
 [ ? ]  setvtrgb
 [ - ]  stop-bootlogd
 [ - ]  stop-bootlogd-single
 [ ? ]  sudo
 [ ? ]  udev
 [ ? ]  udev-fallback-graphics
 [ ? ]  udev-finish
 [ ? ]  udevmonitor
 [ ? ]  udevtrigger
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ - ]  urandom

(precise)mauriciogior@localhost:~$ sudo initctl list
[sudo] password for mauriciogior: 
failsafe-delay stop/waiting
udev start/running, process 87
warn-collector start/running, process 1345
boot-services start/running
cryptohomed-client stop/waiting
laptop-mode-resume stop/waiting
avahi stop/waiting
cras start/running, process 1039
failsafe start/running
modemmanager start/running, process 1033
permission_broker start/running, process 995
dbus start/running, process 277
ec-report-tpsreset stop/waiting
send-powerwash-count stop/waiting
crx-import stop/waiting
halt stop/waiting
login stop/waiting
pre-shutdown stop/waiting
reboot stop/waiting
regulatory-domain stop/waiting
ui-collect-machine-info stop/waiting
hotkey-access stop/waiting
metrics_daemon start/running, process 1051
metrics_library stop/waiting
shill-start-user-session stop/waiting
wpasupplicant start/running, process 322
activate_date stop/waiting
cleanup-shutdown-logs stop/waiting
mosys-info stop/waiting
p2p stop/waiting
ui-init-late stop/waiting
boot-complete start/running
crash-sender start/running, process 997
tpm-probe stop/waiting
dptf start/running, process 1029
lockbox-cache stop/waiting
pre-startup stop/waiting
startup stop/waiting
ui-respawn stop/waiting
uinput stop/waiting
cgroups stop/waiting
chapsd start/running, process 845
iptables stop/waiting
machine-info stop/waiting
pstore stop/waiting
trace_marker-test stop/waiting
boot-alert-ready stop/waiting
boot-splash stop/waiting
cryptohomed start/running, process 865
laptop-mode-boot stop/waiting
powerd start/running, process 562
preload-network stop/waiting
send-smart-metrics stop/waiting
crash-reporter stop/waiting
debugd start/running, process 814
ip6tables stop/waiting
send-kernel-errors stop/waiting
shill-stop-user-session stop/waiting
tcsd start/running, process 844
tlsdated start/running, process 1370
vpd-log stop/waiting
clear-framebuffer stop/waiting
logout stop/waiting
mount-encrypted stop/waiting
shill start/running, process 481
storage-info stop/waiting
swap stop/waiting
udev-trigger stop/waiting
cros-machine-id-regen-periodic start/running, process 1007
disable_echo stop/waiting
report-power-metrics stop/waiting
system-services start/running
update-engine start/running, process 1335
cros-machine-id-regen-network stop/waiting
firewalld start/running, process 1015
firmware-version stop/waiting
mtpd start/running, process 1016
netfilter-queue start/running, process 1385
send-boot-metrics stop/waiting
bluetoothd start/running, process 1066
cros-disks start/running, process 1094
shill_respawn stop/waiting
syslog start/running, process 247
udev-trigger-early stop/waiting
chromeos-touch-update start/running
install-completed start/running
log-rotate start/running, process 1020
report-boot-complete stop/waiting
send-uptime-metrics stop/waiting
ui start/running, process 754
ureadahead stop/waiting

答案1

那是因为也许mysql的服务名称不是mysql.尝试用 列出你机器中的所有服务service --status-all,我认为这在 ubuntu 中有效,但不记得了,因为我不再有一个,如果没有,请尝试使用initctl list

相关内容