navicat错误码1499解决方法

在做课程设计中遇到了一些错误于是在网上找资料解决

资料出处Navicat-MySQL报错1449 - The user specified as a definer (‘mysqlinfoschema‘@‘localhost‘) does not exist-CSDN博客我的解决过程:

具体代码:

mysql> use mysql;
Database changed
mysql> show tables;
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
mysql> drop user 'mysql.infoschema'@'localhost';
ERROR 1396 (HY000): Operation DROP USER failed for 'mysql.infoschema'@'localhost'
mysql> show tables;
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
mysql> select user,host from user;
+--------------------------------+-----------+
| user                           | host      |
+--------------------------------+-----------+
| 'mysql.infoschema'@'localhost' | localhost |
| root                           | localhost |
+--------------------------------+-----------+
2 rows in set (0.00 sec)

mysql>  flush prvileges;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'prvileges' at line 1
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> create user 'mysql.infoschema'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.01 sec)

mysql> select user,host from user;
+--------------------------------+-----------+
| user                           | host      |
+--------------------------------+-----------+
| 'mysql.infoschema'@'localhost' | localhost |
| mysql.infoschema               | localhost |
| root                           | localhost |
+--------------------------------+-----------+
3 rows in set (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to 'mysql.infoschema'@'localhost' with grant option;
Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;
+------------------------------------------------------+
| Tables_in_mysql                                      |
+------------------------------------------------------+
| columns_priv                                         |
| component                                            |
| db                                                   |
| default_roles                                        |
| engine_cost                                          |
| func                                                 |
| general_log                                          |
| global_grants                                        |
| gtid_executed                                        |
| help_category                                        |
| help_keyword                                         |
| help_relation                                        |
| help_topic                                           |
| innodb_index_stats                                   |
| innodb_table_stats                                   |
| ndb_binlog_index                                     |
| password_history                                     |
| plugin                                               |
| procs_priv                                           |
| proxies_priv                                         |
| replication_asynchronous_connection_failover         |
| replication_asynchronous_connection_failover_managed |
| replication_group_configuration_version              |
| replication_group_member_actions                     |
| role_edges                                           |
| server_cost                                          |
| servers                                              |
| slave_master_info                                    |
| slave_relay_log_info                                 |
| slave_worker_info                                    |
| slow_log                                             |
| tables_priv                                          |
| time_zone                                            |
| time_zone_leap_second                                |
| time_zone_name                                       |
| time_zone_transition                                 |
| time_zone_transition_type                            |
| user                                                 |
+------------------------------------------------------+
38 rows in set (0.03 sec)

使用工具:

过程截图:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值