Access denied for all users after MariaDb upgrade

I discovered this morning that MariaDb had been removed from my server in the process of upgrading from FreeBSD 10.3 to 11.1. After getting the database engine reinstalled, and resolving the problems with my.cnf incompatibility, I finally got MariaDb working - except that now every user (other than root) is denied access to their database.

I tried resetting the password for a random user, but that didn't make any difference.

Where is there useful information about what's going wrong here? This is all the information that's in the server.err after restarting the database:
Code:
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Uses event mutexes
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Number of pools: 1
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Using SSE2 crc32 instructions
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Initializing buffer pool, total size = 2G, instances = 8, chunk size = 128M
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Completed initialization of buffer pool
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Highest supported file format is Barracuda.
2018-03-10 11:45:00 34424848384 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-03-10 11:45:00 34424848384 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-03-10 11:45:00 34424848384 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-03-10 11:45:00 34424848384 [Note] InnoDB: 5.7.21 started; log sequence number 25246709
2018-03-10 11:45:00 37094309376 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool
2018-03-10 11:45:00 34424848384 [Note] Plugin 'FEEDBACK' is disabled.
2018-03-10 11:45:00 37094309376 [Note] InnoDB: Buffer pool(s) load completed at 180310 11:45:00
2018-03-10 11:45:00 34424848384 [Note] Server socket created on IP: '::'.
2018-03-10 11:45:00 34424848384 [Note] Reading of all Master_info entries succeded
2018-03-10 11:45:00 34424848384 [Note] Added new Master_info '' to hash table
2018-03-10 11:45:00 34424848384 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '10.2.13-MariaDB-log'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD Ports
2018-03-10 11:45:12 37180893952 [Warning] Access denied for user '<username>'@'localhost' (using password: YES)
2018-03-10 11:45:17 37180893952 [Warning] Access denied for user '<username>'@'localhost' (using password: YES)
2018-03-10 11:46:27 37180893952 [Warning] Access denied for user '<username>'@'localhost' (using password: YES)


While running mysql_update a number of errors were reported. I don't know if these are related, or what I can or should do about them:
Code:
Phase 3/7: Fixing views from mysql
sys.host_summary
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
status   : Operation failed
sys.host_summary_by_file_io
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.host_summary_by_file_io_type
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.host_summary_by_stages
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.host_summary_by_statement_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.host_summary_by_statement_type
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.innodb_buffer_stats_by_schema
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.innodb_buffer_stats_by_table
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.innodb_lock_waits
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.io_by_thread_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.io_global_by_file_by_bytes
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.io_global_by_file_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.io_global_by_wait_by_bytes
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.io_global_by_wait_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.latest_file_io
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.memory_by_host_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.memory_by_host_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.memory_by_thread_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_thread_by_event_name' doesn't exist
status   : Operation failed
sys.memory_by_user_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
status   : Operation failed
sys.memory_global_by_current_bytes
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
status   : Operation failed
sys.memory_global_total
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.memory_global_total' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.metrics
Error    : Table 'performance_schema.global_status' doesn't exist
status   : Operation failed
sys.processlist
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
status   : Operation failed
sys.ps_check_lost_instrumentation
Error    : Table 'performance_schema.global_status' doesn't exist
Error    : View 'sys.ps_check_lost_instrumentation' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.schema_auto_increment_columns                  OK
sys.schema_index_statistics
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.schema_object_overview                         OK
sys.schema_redundant_indexes                       OK
sys.schema_table_lock_waits
Error    : Table 'performance_schema.metadata_locks' doesn't exist
status   : Operation failed
sys.schema_table_statistics
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.schema_table_statistics_with_buffer
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.schema_tables_with_full_table_scans
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.schema_unused_indexes                          OK
sys.session
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.session' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.session_ssl_status
Error    : Table 'performance_schema.status_by_thread' doesn't exist
status   : Operation failed
sys.statement_analysis
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.statements_with_errors_or_warnings
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.statements_with_full_table_scans
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.statements_with_runtimes_in_95th_percentile
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.statements_with_sorting
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.statements_with_temp_tables
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.user_summary
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.user_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.user_summary_by_file_io
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.user_summary_by_file_io_type
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.user_summary_by_stages
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.user_summary_by_statement_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.user_summary_by_statement_type
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.version                                        OK
sys.wait_classes_global_by_avg_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.wait_classes_global_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.waits_by_host_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.waits_by_user_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.waits_global_by_latency
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.x$host_summary
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.x$host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$host_summary_by_file_io                      OK
sys.x$host_summary_by_file_io_type                 OK
sys.x$host_summary_by_stages                       OK
sys.x$host_summary_by_statement_latency            OK
sys.x$host_summary_by_statement_type               OK
sys.x$innodb_buffer_stats_by_schema                OK
sys.x$innodb_buffer_stats_by_table                 OK
sys.x$innodb_lock_waits                            OK
sys.x$io_by_thread_by_latency                      OK
sys.x$io_global_by_file_by_bytes                   OK
sys.x$io_global_by_file_by_latency                 OK
sys.x$io_global_by_wait_by_bytes                   OK
sys.x$io_global_by_wait_by_latency                 OK
sys.x$latest_file_io                               OK
sys.x$memory_by_host_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_host_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$memory_by_thread_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_thread_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_thread_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$memory_by_user_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_user_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$memory_global_by_current_bytes
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.x$memory_global_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$memory_global_total
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.x$memory_global_total' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$processlist
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.x$processlist' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$ps_digest_95th_percentile_by_avg_us          OK
sys.x$ps_digest_avg_latency_distribution           OK
sys.x$ps_schema_table_statistics_io
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.x$schema_flattened_keys                        OK
sys.x$schema_index_statistics                      OK
sys.x$schema_table_lock_waits
Error    : Table 'performance_schema.metadata_locks' doesn't exist
Error    : View 'sys.x$schema_table_lock_waits' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$schema_table_statistics
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.x$schema_table_statistics_with_buffer
Error    : Cannot load from mysql.proc. The table is probably corrupted
Error    : Corrupt
sys.x$schema_tables_with_full_table_scans          OK
sys.x$session
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.x$session' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$statement_analysis                           OK
sys.x$statements_with_errors_or_warnings           OK
sys.x$statements_with_full_table_scans             OK
sys.x$statements_with_runtimes_in_95th_percentile  OK
sys.x$statements_with_sorting                      OK
sys.x$statements_with_temp_tables                  OK
sys.x$user_summary
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.x$user_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Error    : Corrupt
sys.x$user_summary_by_file_io                      OK
sys.x$user_summary_by_file_io_type                 OK
sys.x$user_summary_by_stages                       OK
sys.x$user_summary_by_statement_latency            OK
sys.x$user_summary_by_statement_type               OK
sys.x$wait_classes_global_by_avg_latency           OK
sys.x$wait_classes_global_by_latency               OK
sys.x$waits_by_host_by_latency                     OK
sys.x$waits_by_user_by_latency                     OK
sys.x$waits_global_by_latency                      OK

System information:
Code:
# uname -a
FreeBSD Dreamer 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# pkg info mariadb-server
pkg: No package(s) matching mariadb-server
Sat Mar 10 13:40:36 EST 2018
[root]pts/2://Dreamer/var/db/mysql # pkg info mariadb102-server
mariadb102-server-10.2.13
Name           : mariadb102-server
Version        : 10.2.13
Installed on   : Sat Mar 10 05:33:21 2018 EST
Origin         : databases/mariadb102-server
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : databases ipv6
Licenses       : GPLv2
Maintainer     : brnrd@FreeBSD.org
WWW            : http://mariadb.org/
Comment        : Multithreaded SQL database (server)
Options        :
        CONNECT_EXTRA  : on
        GSSAPI_BASE    : on
        GSSAPI_HEIMDAL : off
        GSSAPI_MIT     : off
        GSSAPI_NONE    : off
        INNOBASE       : on
        LZ4            : off
        LZO            : off
        MROONGA        : off
        MSGPACK        : off
        OQGRAPH        : off
        ROCKSDB        : off
        SNAPPY         : off
        SPHINX         : on
        SPIDER         : on
        TOKUDB         : off
        XTRADB         : off
        ZMQ            : off
        ZSTD           : off
Shared Libs required:
        libiconv.so.2
        libxml2.so.2
        libodbc.so.2
Shared Libs provided:
        libmysqld.so.19
Annotations    :
        FreeBSD_version: 1101001
        cpe            : cpe:2.3:a:mariadb:mariadb:10.2.13:::::freebsd11:x64
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 204MiB
Description    :
MariaDB is a database server that offers drop-in replacement functionality
for MySQL. MariaDB is built by some of the original authors of MySQL, with
assistance from the broader community of Free and open source software
developers. In addition to the core functionality of MySQL, MariaDB offers
a rich set of feature enhancements including alternate storage engines,
server optimizations, and patches.

MariaDB is primarily driven by developers at Monty Program, a company
founded by Michael "Monty" Widenius, the original author of MySQL, but
this is not the whole story about MariaDB. On the "About MariaDB" page you
will find more information about all participants in the MariaDB community,
including storage engines XtraDB and PBXT.

WWW: http://mariadb.org/

# pkg info mariadb102-client
mariadb102-client-10.2.13
Name           : mariadb102-client
Version        : 10.2.13
Installed on   : Sat Mar 10 05:33:00 2018 EST
Origin         : databases/mariadb102-client
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : databases ipv6
Licenses       : GPLv2
Maintainer     : brnrd@FreeBSD.org
WWW            : http://mariadb.org/
Comment        : Multithreaded SQL database (client)
Options        :
        GSSAPI_BASE    : on
        GSSAPI_HEIMDAL : off
        GSSAPI_MIT     : off
        GSSAPI_NONE    : off
Shared Libs required:
        libiconv.so.2
Shared Libs provided:
        libmariadb.so.3
Annotations    :
        FreeBSD_version: 1101001
        cpe            : cpe:2.3:a:mariadb:mariadb:10.2.13:::::freebsd11:x64
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 32.1MiB
Description    :
MariaDB is a database server that offers drop-in replacement functionality
for MySQL. MariaDB is built by some of the original authors of MySQL, with
assistance from the broader community of Free and open source software
developers. In addition to the core functionality of MySQL, MariaDB offers
a rich set of feature enhancements including alternate storage engines,
server optimizations, and patches.

MariaDB is primarily driven by developers at Monty Program, a company
founded by Michael "Monty" Widenius, the original author of MySQL, but
this is not the whole story about MariaDB. On the "About MariaDB" page you
will find more information about all participants in the MariaDB community,
including storage engines XtraDB and PBXT.

WWW: http://mariadb.org/
 
If you're fully sure about the database permissions themselves then have you also taken the file permissions into account? Seems likely that it's either one of those two options.

(edit)

Is localhost actually defined in /etc/hosts? That is a very common problem and if you don't it could lead up to all sorts of weird problems. So:

Code:
::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
 
This was a working server until I upgraded FreeBSD from 10.3 to 11.1, starting Monday of this week, a process which has proven to be pure hell.

/etc/hosts is correct. I haven't done anything to change database or file permissions, would something in the upgrade process (of either FreeBSD or MariaDb) have changed either?

What am I looking for? All of the database files are owned by mysql:mysql and in the mysql database directory, there's a mix of 660 and 640 permissions, whereas in one of the client directories the permissions are all 640. I would expect the difference to be moot, since both the user and group are mysql for all of the files.


As I said, this was a working server before I started upgrading FreeBSD. I haven't done anything to change the permissions on any of the databases or files, in fact, the only things that I did change are the operating system and database engine - and I expected an "upgrade" would be transparent to the data!!
 
Yes, I did run mysql_upgrade. I've edited my question to include the errors that were reported when it ran, but I don't see anything there that would be causing this problem.

I'm also unsure what I can or need to do about the errors that were reported when running mysql_upgrade.
 
I re-ran mysql_upgrade again because the search results I found for "mysql_upgrade Cannot load from mysql.proc. The table is probably corrupted" all seem to indicate such problems are fixed by running mysql_upgrade. (I had to run mysql_upgrade -p --force because without the --force parameter it just said "This installation of MySQL is already upgraded to 10.2.13-MariaDB")

Now I've got a different set of error messages that are equally opaque:
Code:
Phase 3/7: Fixing views
sys.host_summary
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.host_summary_by_file_io
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.host_summary_by_file_io' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.host_summary_by_file_io_type
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.host_summary_by_file_io_type' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.host_summary_by_stages
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.host_summary_by_stages' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.host_summary_by_statement_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.host_summary_by_statement_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.host_summary_by_statement_type
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.host_summary_by_statement_type' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.innodb_buffer_stats_by_schema
Error    : FUNCTION sys.format_bytes does not exist
Error    : View 'sys.innodb_buffer_stats_by_schema' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.innodb_buffer_stats_by_table
Error    : FUNCTION sys.format_bytes does not exist
Error    : View 'sys.innodb_buffer_stats_by_table' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.innodb_lock_waits
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.innodb_lock_waits' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.io_by_thread_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.io_by_thread_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.io_global_by_file_by_bytes
Error    : FUNCTION sys.format_path does not exist
Error    : View 'sys.io_global_by_file_by_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.io_global_by_file_by_latency
Error    : FUNCTION sys.format_path does not exist
Error    : View 'sys.io_global_by_file_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.io_global_by_wait_by_bytes
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.io_global_by_wait_by_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.io_global_by_wait_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.io_global_by_wait_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.latest_file_io
Error    : FUNCTION sys.format_path does not exist
Error    : View 'sys.latest_file_io' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.memory_by_host_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.memory_by_host_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.memory_by_thread_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_thread_by_event_name' doesn't exist
Error    : View 'sys.memory_by_thread_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.memory_by_user_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.memory_by_user_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.memory_global_by_current_bytes
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.memory_global_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.memory_global_total
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.memory_global_total' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.metrics
Error    : Table 'performance_schema.global_status' doesn't exist
Error    : View 'sys.metrics' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.processlist
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.processlist' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.ps_check_lost_instrumentation
Error    : Table 'performance_schema.global_status' doesn't exist
Error    : View 'sys.ps_check_lost_instrumentation' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_auto_increment_columns                  OK
sys.schema_index_statistics
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.schema_index_statistics' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_object_overview                         OK
sys.schema_redundant_indexes                       OK
sys.schema_table_lock_waits
Error    : Table 'performance_schema.metadata_locks' doesn't exist
Error    : View 'sys.schema_table_lock_waits' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_table_statistics
Error    : FUNCTION sys.extract_schema_from_file_name does not exist
Error    : View 'sys.schema_table_statistics' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_table_statistics_with_buffer
Error    : FUNCTION sys.extract_schema_from_file_name does not exist
Error    : View 'sys.schema_table_statistics_with_buffer' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_tables_with_full_table_scans
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.schema_tables_with_full_table_scans' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.schema_unused_indexes                          OK
sys.session
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.session' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.session_ssl_status
Error    : Table 'performance_schema.status_by_thread' doesn't exist
Error    : View 'sys.session_ssl_status' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statement_analysis
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statement_analysis' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statements_with_errors_or_warnings
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statements_with_errors_or_warnings' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statements_with_full_table_scans
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statements_with_full_table_scans' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statements_with_runtimes_in_95th_percentile
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statements_with_runtimes_in_95th_percentile' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statements_with_sorting
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statements_with_sorting' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.statements_with_temp_tables
Error    : FUNCTION sys.format_statement does not exist
Error    : View 'sys.statements_with_temp_tables' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.user_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary_by_file_io
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.user_summary_by_file_io' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary_by_file_io_type
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.user_summary_by_file_io_type' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary_by_stages
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.user_summary_by_stages' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary_by_statement_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.user_summary_by_statement_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.user_summary_by_statement_type
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.user_summary_by_statement_type' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.version                                        OK
sys.wait_classes_global_by_avg_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.wait_classes_global_by_avg_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.wait_classes_global_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.wait_classes_global_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.waits_by_host_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.waits_by_host_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.waits_by_user_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.waits_by_user_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.waits_global_by_latency
Error    : FUNCTION sys.format_time does not exist
Error    : View 'sys.waits_global_by_latency' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$host_summary
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.x$host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$host_summary_by_file_io                      OK
sys.x$host_summary_by_file_io_type                 OK
sys.x$host_summary_by_stages                       OK
sys.x$host_summary_by_statement_latency            OK
sys.x$host_summary_by_statement_type               OK
sys.x$innodb_buffer_stats_by_schema                OK
sys.x$innodb_buffer_stats_by_table                 OK
sys.x$innodb_lock_waits                            OK
sys.x$io_by_thread_by_latency                      OK
sys.x$io_global_by_file_by_bytes                   OK
sys.x$io_global_by_file_by_latency                 OK
sys.x$io_global_by_wait_by_bytes                   OK
sys.x$io_global_by_wait_by_latency                 OK
sys.x$latest_file_io                               OK
sys.x$memory_by_host_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_host_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_host_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$memory_by_thread_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_thread_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_thread_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$memory_by_user_by_current_bytes
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.x$memory_by_user_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$memory_global_by_current_bytes
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.x$memory_global_by_current_bytes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$memory_global_total
Error    : Table 'performance_schema.memory_summary_global_by_event_name' doesn't exist
Error    : View 'sys.x$memory_global_total' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$processlist
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.x$processlist' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$ps_digest_95th_percentile_by_avg_us          OK
sys.x$ps_digest_avg_latency_distribution           OK
sys.x$ps_schema_table_statistics_io
Error    : FUNCTION sys.extract_schema_from_file_name does not exist
Error    : View 'sys.x$ps_schema_table_statistics_io' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$schema_flattened_keys                        OK
sys.x$schema_index_statistics                      OK
sys.x$schema_table_lock_waits
Error    : Table 'performance_schema.metadata_locks' doesn't exist
Error    : View 'sys.x$schema_table_lock_waits' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$schema_table_statistics
Error    : FUNCTION sys.extract_schema_from_file_name does not exist
Error    : View 'sys.x$schema_table_statistics' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$schema_table_statistics_with_buffer
Error    : FUNCTION sys.extract_schema_from_file_name does not exist
Error    : View 'sys.x$schema_table_statistics_with_buffer' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$schema_tables_with_full_table_scans          OK
sys.x$session
Error    : Table 'performance_schema.events_transactions_current' doesn't exist
Error    : View 'sys.x$session' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$statement_analysis                           OK
sys.x$statements_with_errors_or_warnings           OK
sys.x$statements_with_full_table_scans             OK
sys.x$statements_with_runtimes_in_95th_percentile  OK
sys.x$statements_with_sorting                      OK
sys.x$statements_with_temp_tables                  OK
sys.x$user_summary
Error    : Table 'performance_schema.memory_summary_by_user_by_event_name' doesn't exist
Error    : View 'sys.x$user_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
error    : Corrupt
sys.x$user_summary_by_file_io                      OK
sys.x$user_summary_by_file_io_type                 OK
sys.x$user_summary_by_stages                       OK
sys.x$user_summary_by_statement_latency            OK
sys.x$user_summary_by_statement_type               OK
sys.x$wait_classes_global_by_avg_latency           OK
sys.x$wait_classes_global_by_latency               OK
sys.x$waits_by_host_by_latency                     OK
sys.x$waits_by_user_by_latency                     OK
sys.x$waits_global_by_latency                      OK

I tried running mysqlcheck -r sys -p -v and it tells me
Code:
Enter password:
Processing databases
sys
sys.sys_config
Error    : Table 'sys.sys_config' doesn't exist in engine
status   : Operation failed

Is this the root of my problem? If so, how do I fix it?
 
In your case, I would install the same version of MariaDB you had before the upgrade and restore the database from backup to get things in working order. Then, I would test the upgrade again in a safe environment like a VM.
 
I came to the same conclusion, reverted the database server and restored the data from my backup. At least now my system is working again, and I can investigate the problem with less stress.
 
Back
Top