gpt4 book ai didi

mysql - Mac Big Sur MariaDB 无法运行

转载 作者:行者123 更新时间:2023-12-05 08:12:26 31 4
gpt4 key购买 nike

MariaDB 运行良好,但现在无法在启动时运行。我已经卸载,然后重新安装,但没有解决任何问题。

这是 mysql.server.start

的输出

mysql.server 启动

Starting MariaDB
.210913 10:08:11 mysqld_safe Logging to '/usr/local/var/mysql/xxxx-MacBookPro.local.err'.
210913 10:08:11 mysqld_safe Starting mariadbd daemon with databases from /usr/local/var/mysql
/usr/local/bin/mysql.server: line 264: kill: (4944) - No such process
ERROR!

这是我从 brew info mariadb 得到的信息

mariadb: stable 10.6.4 (bottled)
Drop-in replacement for MySQL
https://mariadb.org/
Conflicts with:
mariadb-connector-c (because both install `mariadb_config`)
mysql (because mariadb, mysql, and percona install the same binaries)
mytop (because both install `mytop` binaries)
percona-server (because mariadb, mysql, and percona install the same binaries)
/usr/local/Cellar/mariadb/10.6.4 (902 files, 183MB) *
Poured from bottle on 2021-09-13 at 09:49:21
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mariadb.rb
License: GPL-2.0-only
==> Dependencies
Build: bison ✘, cmake ✘, pkg-config ✘
Required: groonga ✔, openssl@1.1 ✔, pcre2 ✔
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

MySQL is configured to only allow connections from localhost by default

To have launchd start mariadb now and restart at login:
brew services start mariadb
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Analytics
install: 13,312 (30 days), 41,010 (90 days), 166,455 (365 days)
install-on-request: 13,289 (30 days), 40,949 (90 days), 165,680 (365 days)
build-error: 0 (30 days)

这是我从 brew services list 中得到的内容

dnsmasq   stopped                  
httpd error xxxx /usr/local/opt/httpd/homebrew.mxcl.httpd.plist
mariadb xxxx /usr/local/opt/mariadb/homebrew.mxcl.mariadb.plist
mysql@5.7 xxxx /usr/local/opt/mysql@5.7/homebrew.mxcl.mysql@5.7.plist
nginx stopped
php@5.6 stopped
php@7.0 stopped
php@7.3 stopped
php@7.4 stopped

Mac 成功地为 PHP 提供服务,当代码尝试与数据库对话时抛出“连接被拒绝”错误。所以,如果 apache 似乎在运行,我真的不明白 httpd 错误。

这是错误日志的内容(感谢 DanBlack)

这是来自/usr/local/var/mysql/xxxx-MacBookPro.local.err

2021-09-16T15:30:12.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/XXXX-MacBookPro.local.pid ended
210916 17:30:13 mysqld_safe Starting mariadbd daemon with databases from /usr/local/var/mysql
2021-09-16 17:30:13 0 [Note] /usr/local/opt/mariadb/bin/mariadbd (server 10.6.4-MariaDB) starting as process 33244 ...
2021-09-16 17:30:13 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/opt/mariadb/bin/mariadbd: Please consult the Knowledge Base to find out how to run mysqld as root!
2021-09-16 17:30:13 0 [ERROR] Aborting
210916 17:30:13 mysqld_safe mysqld from pid file /usr/local/var/mysql/XXXX-MacBookPro.local.pid ended
2021-09-16T15:30:21.6NZ mysqld_safe Logging to '/usr/local/var/mysql/XXXX-MacBookPro.local.err'.
2021-09-16T15:30:21.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2021-09-16T15:30:21.651835Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-09-16T15:30:21.652151Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2021-09-16T15:30:21.652197Z 0 [Note] /usr/local/opt/mysql@5.7/bin/mysqld (mysqld 5.7.35) starting as process 33337 ...
2021-09-16T15:30:21.655210Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2021-09-16T15:30:21.656555Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-09-16T15:30:21.656576Z 0 [Note] InnoDB: Uses event mutexes
2021-09-16T15:30:21.656585Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-09-16T15:30:21.656593Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-09-16T15:30:21.658530Z 0 [Note] InnoDB: Number of pools: 1
2021-09-16T15:30:21.658624Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-09-16T15:30:21.659813Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-09-16T15:30:21.668320Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-09-16T15:30:21.719277Z 0 [ERROR] InnoDB: Only one log file found.
2021-09-16T15:30:21.719324Z 0 [ERROR] InnoDB: Plugin initialization aborted with error not found
2021-09-16T15:30:22.233348Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-09-16T15:30:22.233372Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-09-16T15:30:22.233382Z 0 [ERROR] Failed to initialize builtin plugins.
2021-09-16T15:30:22.233390Z 0 [ERROR] Aborting

2021-09-16T15:30:22.233402Z 0 [Note] Binlog end
2021-09-16T15:30:22.233465Z 0 [Note] Shutting down plugin 'CSV'
2021-09-16T15:30:22.233770Z 0 [Note] /usr/local/opt/mysql@5.7/bin/mysqld: Shutdown complete

这会每隔几秒重复一次。

但是,我现在可以连接到本地主机 mysql 服务器并使用删除了/usr/local/var/mysql/ib_logfile0 的 mysql 数据库 @ 127.0.0.1 运行东西

最佳答案

遇到了同样的问题。 Mariadb 与之前在我的 M1 mac 上安装的 mysql 发生冲突。删除了 /opt/homebrew/var/mysql/ 文件夹并重新安装了 mariadb。现在工作正常。

关于mysql - Mac Big Sur MariaDB 无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69159310/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com