MySQL Root show grant for when no Al privileges permissions

Source: Internet
Author: User

The same way it was:

MariaDB [(None)]> Select User ();

+----------------+

| User () |

+----------------+

| [Email protected] |

+----------------+

1 row in Set (0.00 sec)


MariaDB [(none)]> show grants for [email protected];

+-------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------+

| Grants for [email protected]                         &NBS P                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp                                                            ,         &NB Sp                          ,         &NB Sp                          ,         &NB Sp        |

+-------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------+

| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DA Tabases, SUPER, create temporary TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, create VIEW, SHOW VI EW, create ROUTINE, ALTER ROUTINE, create USER, EVENT, TRIGGER on * * to ' root ' @ ' localhost ' identified by PASSWORD ' *FF3FB 6e7be54c3d2e0deebd962ef6f5fa4e148da ' with GRANT OPTION |

+-------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------+

1 row in Set (0.00 sec)


MariaDB [(None)]>



The repair method performs a mysql_upgrade-u root-p upgrade.

Reference article: Https://www.douban.com/note/311849800/

[Email protected] ~]# mysql_upgrade-u root-p

Enter Password:

MySQL Upgrade Detected

Phase 1/4: Fixing views from MySQL

Phase 2/4: Fixing table and database names

Phase 3/4: Checking and Upgrading tables

Processing databases

Information_schema

Mysql

Mysql.columns_priv OK

Mysql.db OK

Mysql.event OK

Mysql.func OK

Mysql.help_category OK

Mysql.help_keyword OK

Mysql.help_relation OK

Mysql.help_topic OK

Mysql.host OK

Mysql.ndb_binlog_index OK

Mysql.plugin OK

Mysql.proc OK

Mysql.procs_priv OK

Mysql.servers OK

Mysql.tables_priv OK

Mysql.time_zone OK

Mysql.time_zone_leap_second OK

Mysql.time_zone_name OK

Mysql.time_zone_transition OK

Mysql.time_zone_transition_type OK

Mysql.user OK

Pf

Pf.action OK

Pf.activation OK

Pf.billing OK

Pf.class OK

Pf.configfile OK

Pf.ifoctetslog OK

Pf.inline_accounting OK

Pf.iplog OK

Pf.iplog_archive OK

Pf.iplog_history OK

Pf.keyed OK

Pf.locationlog OK

Pf.locationlog_archive OK

Pf.node OK

Pf.node_category OK

Pf.node_useragent OK

Pf.password OK

Pf.person OK

Pf.pf_version OK

Pf.radacct OK

Pf.radacct_log OK

Pf.radius_nas OK

Pf.savedsearch OK

Pf.scan OK

Pf.sms_carrier OK

Pf.soh_filter_rules OK

Pf.soh_filters OK

Pf.traplog OK

Pf.trigger OK

Pf.userlog OK

Pf.violation OK

Pf.wrix OK

Pf_graphite

Pf_graphite.account_mygraph OK

Pf_graphite.account_profile OK

Pf_graphite.account_variable OK

Pf_graphite.account_view OK

Pf_graphite.account_window OK

Pf_graphite.auth_group OK

Pf_graphite.auth_group_permissions OK

Pf_graphite.auth_permission OK

Pf_graphite.auth_user OK

Pf_graphite.auth_user_groups OK

Pf_graphite.auth_user_user_permissions OK

Pf_graphite.dashboard_dashboard OK

Pf_graphite.dashboard_dashboard_owners OK

Pf_graphite.django_admin_log OK

Pf_graphite.django_content_type OK

Pf_graphite.django_session OK

Pf_graphite.events_event OK

Pf_graphite.tagging_tag OK

Pf_graphite.tagging_taggeditem OK

Test

Phase 4/4: Running ' Mysql_fix_privilege_tables '

Ok

[Email protected] ~]#

[Email protected] ~]#

The fix should look something like this:


[Email protected] ~]# mysql-u root-p

Enter Password:

Welcome to the MariaDB Monitor. Commands End With; or \g.

Your MariaDB Connection ID is 17

Server Version:5.5.48-mariadb-wsrep MariaDB Server, wsrep_25.14.r9949137


Copyright (c), Oracle, MariaDB Corporation Ab and others.


Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.


MariaDB [(none)]> show grants for [email protected];

+-------------------------------------------------------------------------------------------------------------- --------------------------+

|                                                                                                              Grants for [email protected] |

+-------------------------------------------------------------------------------------------------------------- --------------------------+

| GRANT All privileges on * * to ' root ' @ ' localhost ' identified by PASSWORD ' *ff3fb6e7be54c3d2e0deebd962ef6f5fa4e148da ' With GRANT OPTION |

|                                                                      Grant PROXY on "@" to "root" @ ' localhost ' with GRANT OPTION |

+-------------------------------------------------------------------------------------------------------------- --------------------------+

2 rows in Set (0.00 sec)


MariaDB [(None)]>


MySQL Root show grant for when no Al privileges permissions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.