Table 'mysql.user' doesn't exist:ERROR

后端 未结 8 1629
不知归路
不知归路 2020-12-13 14:58

I am creating a db in mysql for a java program.My program works well in my friends system.But I have some problem with my mysql.

The query is below:

         


        
相关标签:
8条回答
  • 2020-12-13 15:36
     show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | datapass_schema    |
    | mysql              |
    | test               |
    +--------------------+
    4 rows in set (0.05 sec)
    
    mysql> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> show tables
        -> ;
    +---------------------------+
    | 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                      |
    +---------------------------+
    23 rows in set (0.00 sec)
    
    mysql> create user m identified by 'm';
    Query OK, 0 rows affected (0.02 sec)
    

    check for the database mysql and table user as shown above if that dosent work, your mysql installation is not proper.

    use the below command as mention in other post to install tables again

    mysql_install_db
    
    0 讨论(0)
  • 2020-12-13 15:38

    Same issue here as lxxxvi describes. Running

        mysql_upgrade -u root
    

    allowed me to then successfully enter a password that

        mysql_secure_installation
    

    was waiting for.

    0 讨论(0)
提交回复
热议问题