FreeBSD 的Ubuntu jail里启动mysql服务器失败的解决方法

在FreeBSD 的jail里安装Ubuntu后,一直没有尝试安装mysql服务器,网上也没有找到相应的文档(这证明要么太难,天底下就没有解决方案;要么太容易,以至于显而易见,所以不需要文档)。

今天终于被迫,要解决这个问题!

首先,在Ubuntu jail里安装mysql server

直接使用apt安装即可:

apt install mysql-server

安装好之后,跟普通Ubuntu系统里不一样,没有自动启动mysql服务(也许这里记错了)

普通Ubuntu系统里,启动mysql服务非常简单,直接执行:

systemctl start mysql
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

报错,使用 systemctl status mysql命令也是报错:

systemctl status mysql

System has not been booted with systemd as init system (PID 1). Can't operate.

Failed to connect to bus: Host is down

系统没有使用 systemd 作为初始化系统(init system)

最终使用如下命令启动服务:

service mysql start

再看看服务器状态:

service mysql status
 * /usr/bin/mysqladmin  Ver 8.0.39-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version		8.0.39-0ubuntu0.22.04.1
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/run/mysqld/mysqld.sock
Uptime:			12 min 11 sec

Threads: 2  Questions: 10  Slow queries: 0  Opens: 438  Flush tables: 3  Open tables: 27  Queries per second avg: 0.013

终于在Ubuntu jail里启动mysql服务拉!

相关推荐
likfishdn13 分钟前
Linux的文件与目录管理
linux·运维·服务器
渲染101专业云渲染15 分钟前
川翔云电脑优势总结
服务器·3d·电脑·blender·maya
chian-ocean33 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=35 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
橘子味的茶二44 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos