zoukankan      html  css  js  c++  java
  • Percona Server 升级 5.7 到 8.0 版本

    今天发现 Percona Server 已经发布了 8.0 的版本,于是把服务端的 MYSQL 的版本升级了下;备份好数据,升级按照官方的文档来

    $ percona-release enable ps-80 release
    $ apt-get update
    $ apt-get install percona-server-server
    
    $ mysql_upgrade
    
    Checking if update is needed.
    Checking server version.
    Running queries to upgrade MySQL server.
    Checking system database.
    mysql.columns_priv                                 OK
    mysql.db                                           OK
    mysql.engine_cost                                  OK
    ...
    Upgrade process completed successfully.
    Checking if update is needed.
    
    $ service mysql restart

    问题:

    ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
    # 解决方法
     mysql_upgrade -u root -p;
    mysql> show databases;
    ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
    mysql> ^C^Z
    [2]+  Stopped                 mysql -uroot -p
    root@iZbp1gf15gbzzqwvxbj18jZ:~# mysql_upgrade -u root -p;
    Enter password: 
    Checking if update is needed.
    Checking server version.
    Running queries to upgrade MySQL server.
    Upgrading system table data.
    Checking system database.
    mysql.columns_priv                                 OK
    mysql.component                                    OK
    mysql.db                                           OK
    mysql.default_roles                                OK
    mysql.engine_cost                                  OK
    mysql.func                                         OK
    mysql.general_log                                  OK
    mysql.global_grants                                OK
    mysql.gtid_executed                                OK
    mysql.help_category                                OK
    mysql.help_keyword                                 OK
    mysql.help_relation                                OK
    mysql.help_topic                                   OK
    mysql.innodb_index_stats                           OK
    mysql.innodb_table_stats                           OK
    mysql.ndb_binlog_index                             OK
    mysql.password_history                             OK
    mysql.plugin                                       OK
    mysql.procs_priv                                   OK
    mysql.proxies_priv                                 OK
    mysql.role_edges                                   OK
    mysql.server_cost                                  OK
    mysql.servers                                      OK
    mysql.slave_master_info                            OK
    mysql.slave_relay_log_info                         OK
    mysql.slave_worker_info                            OK
    mysql.slow_log                                     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
    Found outdated sys schema version 1.5.1.
    Upgrading the sys schema.
    Checking databases.
    Upgrade process completed successfully.
    Checking if update is needed.

    REFER:
    https://www.percona.com/doc/percona-server/LATEST/upgrading_guide.html
    https://stackoverflow.com/questions/10169960/mysql-error-1449-the-user-specified-as-a-definer-does-not-exist

  • 相关阅读:
    between and 相关
    SQL获取所有用户名,数据库名、所有表名、所有字段名及字段类型
    性能优化探讨与分析:
    设置自动收缩数据库
    服务器注册
    多表查询及区别
    sql孤立用户解决方法
    委托、事件、观察者模式
    非托管资源
    C# 预处理器指令
  • 原文地址:https://www.cnblogs.com/Irving/p/10430529.html
Copyright © 2011-2022 走看看