mysql - 错误! MariaDB 服务器进程 #{pid} 未运行

标签 mysql macos mariadb macos-mojave application-shutdown

MariaDB 10.1.41 在 Mojave MacOS MacBook 上运行。

当我拿起它时 mysql.server启动 一切正常,PID 文件已创建,进程正在运行,允许连接,日志中没有错误,一切正常。

但是当我想用 mysql.server stop 关闭它时,我收到通知: 错误! MariaDB 服务器进程 #28071 未运行! (数字 28071 是撰写此问题时的示例进程 ID)。

日志中仍然没有任何内容,进程仍然处于事件状态(在top/ps等中),但PID文件消失了

我可以通过kill -15杀死它,但不是这样的。

它工作正常,但在我从备份中恢复机器后(从 Apple 维修服务返回并清理了硬盘驱动器),它停止了。

my.cnf

[client]

# password       = your_password
port = 3306

socket = "/tmp/mysql.sock"

[mysqld]

#default-time-zone=+00:00
default_time_zone="Europe/Warsaw"

port = 3306
socket = "/tmp/mysql.sock"
tmpdir = "/tmp"
datadir = "/Users/epacha/Work/mysql"

pid-file = /var/run/mysqld/mysqld.pid
pid_file = /var/run/mysqld/mysqld.pid

# enable-named-pipe
key_buffer_size = 32M
max_allowed_packet = 32M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "/Users/epacha/Work/logs/mysql_error.log"

#innodb_force_recovery = 1

# Change here for bind listening
# bind-address="127.0.0.1"
# bind-address = ::1          # for ipv6

# Where do all the plugins live
#plugin_dir = "/Users/epacha/Work/mysql/lib/plugin/"

#skip-networking
#skip-federated

#log-bin=mysql-bin

server-id = 1

#master-host     =   <hostname>
#master-user     =   <username>
#master-password =   <password>
#master-port     =  <port>

#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Comment the following if you are using InnoDB tables
#skip-innodb
#innodb_data_home_dir = "/Users/epacha/Work/mysql"
#innodb_log_group_home_dir = "/Users/epacha/Work/mysql"

innodb_data_home_dir = "/Users/epacha/Work/mysql"
#innodb_log_group_home_dir = "/Users/epacha/Work/mysql"
innodb_data_file_path = ibdata1:10M:autoextend

#innodb_log_arch_dir = "/Users/epacha/Work/mysql"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high

innodb_buffer_pool_size = 512MB

# DEPRECATED innodb_additional_mem_pool_size = 32MB

# ? innodb_empty_free_list_algorithm = 32M

## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 128MB
innodb_log_buffer_size = 128MB
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'

collation_server=utf8_unicode_ci
character_set_server=utf8

#skip-character-set-client-handshake
#character_sets-dir="/Users/epacha/Work/mysql/charsets"

[mysqldump]
quick
max_allowed_packet = 128M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer_size = 32M
sort_buffer_size = 32M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

mysql_error.log

190902 17:48:40 mysqld_safe Starting mysqld daemon with databases from /Users/epacha/Work/mysql
2019-09-02 17:48:40 4582905280 [Note] /usr/local/Cellar/mariadb@10.1/10.1.41/bin/mysqld (mysqld 10.1.41-MariaDB) starting as process 28702 ...
2019-09-02 17:48:40 4582905280 [Warning] Setting lower_case_table_names=2 because file system for /Users/epacha/Work/mysql/ is case insensitive
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2019-09-02 17:48:40 4582905280 [Note] InnoDB: The InnoDB memory heap is disabled
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-09-02 17:48:40 4582905280 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Using SSE crc32 instructions
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Initializing buffer pool, size = 512.0M
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Completed initialization of buffer pool
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Highest supported file format is Barracuda.
2019-09-02 17:48:40 4582905280 [Note] InnoDB: 128 rollback segment(s) are active.
2019-09-02 17:48:40 4582905280 [Note] InnoDB: Waiting for purge to start
2019-09-02 17:48:40 4582905280 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.44-86.0 started; log sequence number 15092793366
2019-09-02 17:48:40 123145520132096 [Note] InnoDB: Dumping buffer pool(s) not yet started
2019-09-02 17:48:40 4582905280 [Note] Plugin 'FEEDBACK' is disabled.
2019-09-02 17:48:40 4582905280 [Note] Server socket created on IP: '::'.
2019-09-02 17:48:40 4582905280 [Note] /usr/local/Cellar/mariadb@10.1/10.1.41/bin/mysqld: ready for connections.
Version: '10.1.41-MariaDB'  socket: '/tmp/mysql.sock'  port: 3306  Homebrew

最佳答案

我通过使用参数--user解决了同样的问题:

mysql.server status --user=[my_current_user]

关于mysql - 错误! MariaDB 服务器进程 #{pid} 未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57759842/

相关文章:

php - 一次在 php 中下载 liks?

php - 让新用户自动关注用户

JavaScript 未在 WKWebView 中执行

ios - LLDB - 如何在不停止进程的情况下附加到进程

c++ - 为什么malloc()返回高位地址?

mysql - Powershell : Convert MariaDB query to String

mysql - 安装 MariaDB 归档引擎

mysql - SQL 查询在 Web 托管上执行时出现错误,但在 localhost 上运行时没有问题

mysql - mysql 中的 REPLACE 无法使用可用空间。如何重命名可用空间?

php - 尝试添加新用户,但出现此错误