mysql - 无法让 mysql 5.5 在 mac 10.6 上运行

标签 mysql osx-snow-leopard

我是 MySQL 新手,尝试从终端运行 mysql 服务器,但无法运行。这是我所做的: 1-安装mysql。
2-打开终端。
3-浏览到mysql目录/usr/local/mysql/bin并执行以下命令./mysqld --console。
4-然后我收到以下消息:

120208  3:40:55 [Warning] Can't create test file /usr/local/mysql-5.5.20-osx10.6-x86_64/data/Fareed-Rezaeis-iMac.lower-test  
120208  3:40:55 [Warning] Can't create test file /usr/local/mysql-5.5.20-osx10.6-x86_64/data/Fareed-Rezaeis-iMac.lower-test  
120208  3:40:55 [Note] Plugin 'FEDERATED' is disabled.  
./mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)  
120208  3:40:55 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.  
120208  3:40:55 InnoDB: The InnoDB memory heap is disabled  
120208  3:40:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins  
120208  3:40:55 InnoDB: Compressed tables use zlib 1.2.3  
120208  3:40:55 InnoDB: Initializing buffer pool, size = 128.0M   
120208  3:40:55 InnoDB: Completed initialization of buffer pool  
120208  3:40:55  InnoDB: Operating system error number 13 in a file operation.  
InnoDB: The error means mysqld does not have the access rights to  
InnoDB: the directory.  
InnoDB: File name ./ibdata1    
InnoDB: File operation call: 'create'.  
InnoDB: Cannot continue operation.  

PS:我尝试浏览到 /usr/local/mysql-5.5.20-osx10.6-x86_64/bin 目录,但仍然得到相同的结果。我研究并发现了一些建议,例如更改 basedir 和 datadir,但没有得到任何结果

最佳答案

这一切都与用户名有关......MySQL期望用户名是mysql,而真正的用户名是_mysql。

您只需修复与我所说的相关的权限,并且会像魅力一样工作。

关于mysql - 无法让 mysql 5.5 在 mac 10.6 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9186326/

相关文章:

c++ - libtiff.3.dylib : unknown required load command 0x80000022

MySQL - 每个特定 ID 仅返回 1 条记录

cocoa - 如何在启用 ARC 的情况下部署到 Snow Leopard

php - MYSQL - 从不同行获取值并将它们返回到同一行

java - 迁移到 OpenJDK 11,哪个版本的 MySql 连接器与 java 11 兼容?

Python:MySQLdb 和 "Library not loaded: libmysqlclient.16.dylib"

device-driver - 在 OS X 中对 HID 设备的原始访问

ios - Xcode 4.5 与雪豹上的 iOS 6

phpmyadmin 删除 [somemark]text[/somemark] 之间的文本

MySQL 在两个端口上使用 IPTables - 自访问