0
votes

I'm new to MySQL and trying to run mysql server from terminal and cant get it running. here is what I did: 1-installed mysql.
2-opened terminal.
3-browsed to mysql directory /usr/local/mysql/bin and executed the following command ./mysqld --console.
4-then I get the following message:

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: I tried browsing to the /usr/local/mysql-5.5.20-osx10.6-x86_64/bin directory, and I'm still getting the same result. I have researched and found some suggestions like changing the basedir and datadir, but didnt get any result

1
One issue is "The error means mysqld does not have the access rights to the directory" -- what are the permissions on the directory?jcmeloni
did you try using sudo to kick it off?prodigitalson
thanks, I tried to use sudo and bingo!! it worked!! thanksfareed

1 Answers

2
votes

Its all about user name... MySQL expecting a username to be mysql, while real username is _mysql.

You just have to fix permissions related to what I said and will work like charm.