【发布时间】:2021-04-29 17:03:46
【问题描述】:
所以我创建了我的 .bash_profile,在文本编辑器中打开它并添加:
export PATH=$PATH:/usr/local/mysql/bin
然后我保存了它。接下来,我尝试运行
sudo /usr/local/mysql/support-files/mysql.server start
被告知输入我的密码(所以我做了),然后终端说
Starting MySQL
然后它一直打印点,直到它说:
ERROR! The server quit without updating PID file (/usr/local/mysql/data/Nicks-MacBook-Pro.local.pid).
错误日志如下所示:
2021-01-25T20:50:49.707062Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.23) starting as process 15092
2021-01-25T20:50:49.710232Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
2021-01-25T20:50:49.834599Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-01-25T20:50:49.943719Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-01-25T20:50:50.037810Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2021-01-25T20:50:50.125494Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-01-25T20:50:50.126128Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-01-25T20:50:50.151069Z 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.0.23' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server - GPL.
~
~
~
~
~
(END)
我该如何解决这个问题?
【问题讨论】:
-
检查 mysql 错误日志,看看它说了什么。
-
你必须检查 mysql.ini 文件,看看 mysql 把他的文件写在哪里
-
这取决于你的分布,每个搜索引擎都会给你一些提示在哪里可以找到它
-
使用 sudo 你可以改变它,因为你获得了临时的 root 权限
-
您应该向我们展示 mysql 错误日志,最终您应该在此处删除此问题并在 DBA 中发布一个新问题
标签: mysql terminal mysql-python sudo