After installing mysql I get the following errors:

> 120105  6:02:49 [Warning] Setting lower_case_table_names=2 because
> file system for /usr/local/var/mysql/ is case insensitive mysqld:
> Table 'mysql.plugin' doesn't exist
> **120105  6:02:49 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.** 120105  6:02:49 InnoDB: The InnoDB
> memory heap is disabled 120105  6:02:49 InnoDB: Mutexes and rw_locks
> use GCC atomic builtins 120105  6:02:49 InnoDB: Compressed tables use
> zlib 1.2.5 120105  6:02:49 InnoDB: Initializing buffer pool, size =
> 128.0M 120105  6:02:49 InnoDB: Completed initialization of buffer pool 120105  6:02:49 InnoDB: highest supported file format is Barracuda.
> 120105  6:02:49  InnoDB: Waiting for the background threads to start
> 120105  6:02:50 InnoDB: 1.1.8 started; log sequence number 1595675
> **120105  6:02:50 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist**

I have tried to run mysql_upgrade and I get the following:

Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

I have tried to re-install mysql. I get the same results.

I am wondering if someone can suggest some useful tricks to get this working. I am using a mac running 10.7.2

Thanks again for your help in advance.


The problem I see is the error message that says

Table 'mysql.plugin' doesn't exist **120105 6:02:49 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it

MySQL 5.1 introduced plugins. MySQL 5.0 and prior do not have plugins. My guess is that you had MySQL 5.0 running, you uninstalled MySQL 5.0, and tried to install either MySQL 5.1 or 5.5 and it complained about mysql.plugin being missing.

Try cleaning up the 5.0 install as follows

  • uninstall mysql 5.0
  • Move /usr/local/var/mysql to /usr/local/var/mysql_old
  • Install mysql 5.5

Give it a Try !!!

| improve this answer | |

As an alternate solution to that of RolandoMySQLDBA, you may also want to try running the mysql_upgrade utility, built just for such cases.

You should execute it after the server has loaded (with errors and all). It will then connect as a client, add and modify the necessary system tables, and let you know if it worked.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.