Mysql运行的STOPPING server from pid file /var/run/mysqld/mysqld.pid错误

本文记录了在Linux环境下遇到的MySQL启动失败问题,并详细描述了解决过程。主要错误为无法创建或写入mysqld.pid文件,通过创建相应目录并调整权限最终解决了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

晕倒,刚才写的东西全没了.....

     今天在linux上安装出现了如下错误:

STOPPING server from pid file /var/run/mysqld/mysqld.pid
051111 10:35:27  mysqld ended


[1]+  Done                    bin/mysqld_safe --user=mysql

    看了下/var/lib/mysql日志文件,有如下提示:

051110 10:33:54  InnoDB: Started; log sequence number 0 43655
051110 10:33:54 [ERROR] /usr/local/mysql-max-5.0.15-linux-i686-glibc23/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
051110 10:33:54 [ERROR] Can't start server: can't create PID file: No such file or directory
051110 10:33:54  mysqld ended

 看出有文件未找到的错误,尝试了如下命令:

mkdir /var/run/mysqld

    运行mysql,错误依旧.

在网上查了下,说还有可能是权限问题,于是尝试:

chown -R mysql /var/run/mysqld
chgrp -R mysql /var/run/mysqld

    Success!

-- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 16:01:55 localhost.localdomain mysql-systemd-start[12907]: 2025-06-19 16:01:55 0 [Note] / usr/sbin/mysqld (mysqld 5.6.51) starting as process 12930 ... 6月 19 16:01:55 localhost.localdomain mysql-systemd-start[12907]: 2025-06-19 16:01:55 12930 [Not e] /usr/sbin/mysqld: Shutdown complete 6月 19 16:01:55 localhost.localdomain mysql-systemd-start[12907]: 2025-06-19 16:01:55 0 [Note] / usr/sbin/mysqld (mysqld 5.6.51) starting as process 12941 ... 6月 19 16:01:55 localhost.localdomain mysql-systemd-start[12907]: 2025-06-19 16:01:55 12941 [Not e] /usr/sbin/mysqld: Shutdown complete 6月 19 16:01:55 localhost.localdomain mysql-systemd-start[12907]: --defaults-file argument to my sqld_safe when starting the server 6月 19 16:01:56 localhost.localdomain mysqld_safe[12953]: 250619 16:01:56 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 16:01:56 localhost.localdomain mysqld_safe[12953]: 250619 16:01:56 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 16:01:56 localhost.localdomain mysqld_safe[12953]: 250619 16:01:56 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended 6月 19 16:11:55 localhost.localdomain systemd[1]: mysqld.service start-post operation timed out. Stopping. -- Subject: Unit mysqld.service has failed -- Unit mysqld.service has failed. 6月 19 16:11:55 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state. 6月 19 16:11:55 localhost.localdomain systemd[1]: mysqld.service failed. 6月 19 16:11:56 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling r estart. -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 16:11:56 localhost.localdomain mysqld_safe[19213]: 250619 16:11:56 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 16:11:56 localhost.localdomain mysqld_safe[19213]: 250619 16:11:56 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 16:11:57 localhost.localdomain mysqld_safe[19213]: 250619 16:11:57 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 16:23:58 localhost.localdomain mysql-systemd-start[27149]: 2025-06-19 16:23:58 0 [Note] / usr/sbin/mysqld (mysqld 5.6.51) starting as process 27165 ... 6月 19 16:24:00 localhost.localdomain mysql-systemd-start[27149]: 2025-06-19 16:24:00 0 [Note] / usr/sbin/mysqld (mysqld 5.6.51) starting as process 27201 ... 6月 19 16:24:02 localhost.localdomain mysql-systemd-start[27149]: --defaults-file argument to my sqld_safe when starting the server 6月 19 16:24:03 localhost.localdomain mysqld_safe[27239]: 250619 16:24:03 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 16:24:03 localhost.localdomain mysqld_safe[27239]: 250619 16:24:03 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql -- Subject: Unit mysqld.service has finished start-up -- Unit mysqld.service has finished starting up. -- Subject: Unit mysqld.service has begun shutting down -- Unit mysqld.service has begun shutting down. 6月 19 16:42:34 localhost.localdomain mysqld_safe[27239]: 250619 16:42:34 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 16:42:35 localhost.localdomain mysqld_safe[35199]: 250619 16:42:35 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 16:42:35 localhost.localdomain mysqld_safe[35199]: 250619 16:42:35 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql -- Subject: Unit mysqld.service has finished start-up -- Unit mysqld.service has finished starting up. 6月 19 17:22:37 localhost.localdomain sudo[52110]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl restart mysqld -- Subject: Unit mysqld.service has begun shutting down -- Unit mysqld.service has begun shutting down. 6月 19 17:22:38 localhost.localdomain mysqld_safe[35199]: 250619 17:22:38 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:22:39 localhost.localdomain mysqld_safe[52143]: 250619 17:22:39 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:22:39 localhost.localdomain mysqld_safe[52143]: 250619 17:22:39 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:22:41 localhost.localdomain mysqld_safe[52143]: 250619 17:22:41 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended 6月 19 17:23:26 localhost.localdomain sudo[52851]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl restart mysqld -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:23:26 localhost.localdomain mysqld_safe[52874]: 250619 17:23:26 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:23:26 localhost.localdomain mysqld_safe[52874]: 250619 17:23:26 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:23:28 localhost.localdomain mysqld_safe[52874]: 250619 17:23:28 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:24:11 localhost.localdomain mysqld_safe[53592]: 250619 17:24:11 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:24:11 localhost.localdomain mysqld_safe[53592]: 250619 17:24:11 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:24:14 localhost.localdomain mysqld_safe[53592]: 250619 17:24:14 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended 6月 19 17:25:12 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=k illed status=9 -- Subject: Unit mysqld.service has failed -- Unit mysqld.service has failed. 6月 19 17:25:12 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state. 6月 19 17:25:12 localhost.localdomain systemd[1]: mysqld.service failed. 6月 19 17:25:12 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling r estart. -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:25:13 localhost.localdomain mysqld_safe[54465]: 250619 17:25:13 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:25:13 localhost.localdomain mysqld_safe[54465]: 250619 17:25:13 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:25:15 localhost.localdomain mysqld_safe[54465]: 250619 17:25:15 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended 6月 19 17:25:34 localhost.localdomain sudo[54929]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl restart mysqld -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:25:34 localhost.localdomain mysqld_safe[54953]: 250619 17:25:34 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:25:34 localhost.localdomain mysqld_safe[54953]: 250619 17:25:34 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:25:36 localhost.localdomain mysqld_safe[54953]: 250619 17:25:36 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended 6月 19 17:26:42 localhost.localdomain sudo[55901]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/pkill -9 mysqld 6月 19 17:26:49 localhost.localdomain sudo[55973]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/mysqld_safe --defaults-file=/etc/my.cnf 6月 19 17:31:13 localhost.localdomain sudo[58906]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl status mysqld 6月 19 17:33:49 localhost.localdomain sudo[60461]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl status mysqld 6月 19 17:33:59 localhost.localdomain sudo[60563]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/sbin/service mysqld status 6月 19 17:34:08 localhost.localdomain sudo[60663]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl start mysqld 6月 19 17:34:32 localhost.localdomain sudo[60935]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl start mysqld 6月 19 17:34:50 localhost.localdomain sudo[61150]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/sbin/service mysqld status 6月 19 17:35:34 localhost.localdomain systemd[1]: mysqld.service start-post operation timed out. Stopping. -- Subject: Unit mysqld.service has failed -- Unit mysqld.service has failed. 6月 19 17:35:34 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state. 6月 19 17:35:34 localhost.localdomain systemd[1]: mysqld.service failed. 6月 19 17:35:34 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling r estart. -- Subject: Unit mysqld.service has finished shutting down -- Unit mysqld.service has finished shutting down. -- Subject: Unit mysqld.service has begun start-up -- Unit mysqld.service has begun starting up. 6月 19 17:35:35 localhost.localdomain mysqld_safe[61625]: 250619 17:35:35 mysqld_safe Logging to '/var/log/mysqld.log'. 6月 19 17:35:35 localhost.localdomain mysqld_safe[61625]: 250619 17:35:35 mysqld_safe Starting m ysqld daemon with databases from /var/lib/mysql 6月 19 17:35:37 localhost.localdomain mysqld_safe[61625]: 250619 17:35:37 mysqld_safe mysqld fro m pid file /var/run/mysqld/mysqld.pid ended
06-20
结合我们之前沟通及操作历史记录,就我以下系统及操作记录作出下一步操作指命,不要跨步,我会依据执行结果反馈给你,你再依据所有信息分板如何进行下一步操作。 硬件:斐讯N1盒子 底层ARMBIAN系统信息: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _` | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 113.78.***.*** Performance: Load: 14% Uptime: 2:05 Memory usage: 26% of 1.76G CPU temp: 49°C Usage of /: 42% of 6.4G storage/: 10% of 29G RX today: 303 MiB Commands: 1PANEL安装日志: [1Panel Log]: Docker 服务已成功重启。 设置 1Panel 端口 (默认是 14687): [1Panel Log]: 您设置的端口是: 14687 设置 1Panel 安全入口 (默认是 8382ffe897): haoyong [1Panel Log]: 您设置的面板安全入口是 haoyong 设置 1Panel 面板用户 (默认是 39e66cce8f): haoyong [1Panel Log]: 您设置的面板用户是 haoyong [1Panel Log]: 设置 1Panel 面板密码,设置后按回车键继续 (默认是 1f8ae2a537): ************** [1Panel Log]: 正在配置 1Panel 服务 Created symlink /etc/systemd/system/multi-user.target.wants/1panel-agent.service → /etc/systemd/system/1panel-agent.service. Created symlink /etc/systemd/system/multi-user.target.wants/1panel-core.service → /etc/systemd/system/1panel-core.service. [1Panel Log]: 正在启动 1Panel 服务 [1Panel Log]: 1Panel 服务已成功启动,正在继续执行后续配置,请稍候... [1Panel Log]: [1Panel Log]: =================感谢您的耐心等待,安装已完成================== [1Panel Log]: [1Panel Log]: 请使用您的浏览器访问面板: [1Panel Log]: 外部地址: http://113.78.237.211:14687/haoyong [1Panel Log]: 内部地址: http://192.168.1.7:14687/haoyong [1Panel Log]: 面板用户: haoyong [1Panel Log]: 面板密码: SANDking100005 [1Panel Log]: [1Panel Log]: 官方网站: https://1panel.cn [1Panel Log]: 项目文档: https://1panel.cn/docs [1Panel Log]: 代码仓库: https://github.com/1Panel-dev/1Panel [1Panel Log]: 前往 1Panel 官方论坛获取帮助: https://bbs.fit2cloud.com/c/1p/7 [1Panel Log]: [1Panel Log]: 如果您使用的是云服务器,请在安全组中打开端口 14687 [1Panel Log]: [1Panel Log]: 为了您的服务器安全,离开此屏幕后您将无法再次看到您的密码,请记住您的密码。 [1Panel Log]: [1Panel Log]: ================================================================ root@armbian:~# mysql安装内容: 安装 名称 mysql 版本 Root 密码 100005 端口 3306 容器名称 可以为空,为空自动生成 允许端口外部访问会放开防火墙端口 CPU 限制 0 核心数 限制为 0 则关闭限制,最大可用为 4核 内存限制 0 限制为 0 则关闭限制,最大可用为 1800.98MB 在应用启动之前执行 docker pull 来拉取镜像 编辑 compose 文件可能导致软件安装失败 系统相关检查如下: root@armbian:~# uname -m aarch64 root@armbian:~# uname -r 5.15.186-ophub root@armbian:~# lsb_release -a || cat /etc/os-release No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 447Mi 598Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# nproc nproc 4 4 root@armbian:~# free -h total used free shared buff/cache available Mem: 1.8Gi 445Mi 599Mi 19Mi 755Mi 1.2Gi Swap: 900Mi 0B 900Mi root@armbian:~# df -h / Filesystem Size Used Avail Use% Mounted on /dev/mmcblk2p2 6.4G 2.7G 3.7G 42% / root@armbian:~# sudo ss -tulpn | grep -E '80|443|3306|6379' tcp LISTEN 0 4096 0.0.0.0:14687 0.0.0.0:* users:(("1panel",pid=801,fd=11)) root@armbian:~# curl -I https://xibo.org.uk HTTP/2 301 server: nginx date: Sat, 19 Jul 2025 07:14:41 GMT content-type: text/html content-length: 169 location: https://xibosignage.com/ referrer-policy: no-referrer-when-downgrade strict-transport-security: max-age=31536000 root@armbian:~# 拉取源的测试如下: oot@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker images | grep hello-world hello-world latest f1f77a0f96b7 5 months ago 5.2kB root@armbian:~# docker history hello-world IMAGE CREATED CREATED BY SIZE COMMENT f1f77a0f96b7 5 months ago CMD ["/hello"] 0B buildkit.dockerfile.v0 <missing> 5 months ago COPY hello / # buildkit 5.2kB buildkit.dockerfile.v0 root@armbian:~# ^C 用1PANEL设置DOCKER及拉取MYSQL的操作日志: _ _ _ ___ ___ /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \/ __| / _ \| '_| ' \| '_ \ / _` | ' \ | (_) \__ \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| \___/|___/ v25.08.0 for Aml.S905d running Armbian Linux 5.15.186-ophub Packages: Debian stable (bullseye) IPv4: (LAN) 192.168.1.7 (WAN) 116.4.***.*** Performance: Load: 13% Uptime: 7:23 Memory usage: 27% of 1.76G CPU temp: 51°C Usage of /: 42% of 6.4G storage/: 19% of 29G RX today: 79 MiB Commands: Configuration : armbian-config Monitoring : htop root@armbian:~# docker run -d \ --name mysql \ -p 3306:3306 \ -v /mnt/docker/mysql/data:/var/lib/mysql \ -v /mnt/docker/mysql/conf:/etc/mysql/conf.d \ -v /mnt/docker/mysql/log:/var/log/mysql \ -e MYSQL_ROOT_PASSWORD=100005 \ --memory=512m \ --cpus=2 \ --restart=always \ mysql:8.0-oracle Unable to find image 'mysql:8.0-oracle' locally 8.0-oracle: Pulling from library/mysql 66c8c73e9d3d: Pull complete e45847b03d78: Pull complete 87befc648177: Pull complete 008e8e968476: Pull complete a72970729c8f: Pull complete 89b1faffd43a: Pull complete 2bd146ae1d6c: Pull complete a0967528f1a2: Pull complete 38c697cea99a: Pull complete fab608026c1e: Pull complete 24e041f1adac: Pull complete Digest: sha256:63823b8e2cbe4ae0c558155e02d00beba56130fbc3d147efccbdb328ae2dbb9e Status: Downloaded newer image for mysql:8.0-oracle 67460db937cbeedc95691f01d4b961e6a42616b45f60cd62107f73bd48b2b2b9 root@armbian:~# ^C root@armbian:~# docker ps -a | grep mysql 67460db937cb mysql:8.0-oracle "docker-entrypoint.s…" 8 minutes ago Up 6 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql root@armbian:~# docker logs mysql 2025-07-19 10:55:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-07-19 10:55:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.42-1.el9 started. 2025-07-19 10:55:44+00:00 [Note] [Entrypoint]: Initializing database files 2025-07-19T10:55:44.643965Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:55:44.644644Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.42) initializing of server in progress as process 82 2025-07-19T10:55:44.722791Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:55:48.060736Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:03.156308Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Database files initialized 2025-07-19 10:56:16+00:00 [Note] [Entrypoint]: Starting temporary server 2025-07-19T10:56:16.845924Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:16.851097Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 126 2025-07-19T10:56:16.917937Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:17.897029Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:21.388398Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:21.388602Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:56:21.415665Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:56:21.548697Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:56:21.549457Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL. 2025-07-19 10:56:21+00:00 [Note] [Entrypoint]: Temporary server started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. 2025-07-19 10:56:44+00:00 [Note] [Entrypoint]: Stopping temporary server 2025-07-19T10:56:44.779995Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.42). 2025-07-19T10:56:46.899809Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: Temporary server stopped 2025-07-19 10:56:47+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up. 2025-07-19T10:56:48.299792Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. 2025-07-19T10:56:48.305067Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.42) starting as process 1 2025-07-19T10:56:48.334120Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-07-19T10:56:49.180497Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-07-19T10:56:54.411653Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-07-19T10:56:54.411875Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-07-19T10:57:02.537906Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2025-07-19T10:57:02.670404Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2025-07-19T10:57:02.670930Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.42' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. root@armbian:~# docker exec -it mysql mysql -uroot -p100005 -e "SHOW DATABASES;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ root@armbian:~# mysql -h 192.168.1.7 -P 3306 -uroot -p100005 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.42 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [(none)]> ^接下来怎么操作
最新发布
07-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值