我在顶部{。{3}}使用.dmg文件为Mac 10.14安装了mysql,并运行了安装程序。我的系统是Mac 10.13.6,但有一条注释说应该可以。
在/usr/local/
处有一个mysql
文件夹和一个mysql-8.0.13-macos10.14-x86_64
文件夹。
运行mysqld
时出现以下错误:
mysqld: Can't change dir to '/usr/local/mysql-8.0.13-macos10.14-x86_64/data/' (OS errno 13 - Permission denied)
ts 0 [System] [MY-010116] [Server] /usr/local/mysql-8.0.13-macos10.14-x86_64/bin/mysqld (mysqld 8.0.13) starting as process 9863
ts 0 [Warning] [MY-010091] [Server] Can't create test file /usr/local/mysql-8.0.13-macos10.14-x86_64/data/Monicas-MacBook-Pro.lower-test
ts 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql-8.0.13-macos10.14-x86_64/data/ is case insensitive
ts 0 [ERROR] [MY-010172] [Server] failed to set datadir to /usr/local/mysql-8.0.13-macos10.14-x86_64/data/
ts 0 [ERROR] [MY-010119] [Server] Aborting
ts 0 [System] [MY-010910] [Server] /usr/local/mysql-8.0.13-macos10.14-x86_64/bin/mysqld: Shutdown complete (mysqld 8.0.13) MySQL Community Server - GPL.
ts
是UTC时间戳。
命令mysqld
来自/usr/local/mysql/
和要写入/usr/local/mysql-8.0.13...../data/
的目录是问题吗?我的工作计算机上的用户是否没有正确的权限来写入这些目录?
我已经尝试过sudo
:
Please read "Security" section of the manual to find out how to run mysqld as root!
答案 0 :(得分:0)
重新启动计算机。
如果这不起作用:
如果您在virtualenv中,请尝试在全局安装所需的python-to-mysql库,这也很有帮助。
最后要尝试的是
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib/:${DYLD_LIBRARY_PATH}"