The first thing you need to do is run these commands:
use mysql
show tables;
Please note the differences
MySQL 5.0 has 17 tables in the mysql schema
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
MySQL 5.1 has 23 tables in the mysql schema
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
MySQL 5.5 has 24 tables in the mysql schema
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
Please note that mysql.plugin does not exist in MySQL 5.0. It is very plausible to surmise that you somehow installed MySQL 5.0 and made vital tables for MySQL 5.5 disappear.
Here is some good news. There is something you can try.
For this example
- ServerA is where your MySQL 5.5 data lives
- ServerB is where you will create a separate MySQL 5.5 environment
Here are your steps
- On ServerA, mkdir /root/myusers
- On ServerA, cp /var/lib/mysql/mysql/user.* /root/myusers/.
- Install MySQL 5.5 on ServerB
- scp ServerB:/var/lib/mysql/mysql/* ServerA:/var/lib/mysql/mysql/.
- On ServerA, cp /root/myusers/user.* /var/lib/mysql/mysql/.
- service mysql start
That's it.
If you are running this in Windows, the same principles have to apply.
Give it a Try !!!
UPDATE 2011-07-29 16:15 EDT
If your usernames had DB Specific Privileges, here are your steps
- On ServerA, mkdir /root/myusers
- On ServerA, cp /var/lib/mysql/mysql/user.* /root/myusers/.
- On ServerA, cp /var/lib/mysql/mysql/db.* /root/myusers/.
- Install MySQL 5.5 on ServerB
- scp ServerB:/var/lib/mysql/mysql/* ServerA:/var/lib/mysql/mysql/.
- On ServerA, cp /root/myusers/* /var/lib/mysql/mysql/.
- service mysql start