在Mac OS X Catalina上将MySQL Workbench更新为8.0.18版本,此后我的数据库不再显示,由于连接错误,我的网站也无法在localhost上启动。
在以下文件夹中:OS X〜/ Library / Application \ Support / MySQL / Workbench /我删除了wb_options.xml和wb_state.xml文件并重新启动了Workbench,但未显示任何数据库。
试图进入命令行,我可以在其中输入以下命令:
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
mysql -u root -p
mysql> SET GLOBAL innodb_fast_shutdown = 1;
mysql_upgrade -u root -p
输出:
➜ mysql mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 8.0.18 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET GLOBAL innodb_fast_shhutdown = 1;
ERROR 1193 (HY000): Unknown system variable 'innodb_fast_shhutdown'
mysql> SET GLOBAL innodb_fast_shutdown = 1;
Query OK, 0 rows affected (0,00 sec)
mysql> mysql_upgrade -u root -p
没有进一步的输出。
看了一下wb.log:
07:45:48 [INF][ Workbench]: Starting up Workbench
07:45:48 [INF][ WBContext UI]: Initializing workbench context UI with these values:
base dir: /Applications/MySQLWorkbench 2.app/Contents/Resources
plugin path: /Applications/MySQLWorkbench 2.app/Contents/PlugIns
struct path: /Applications/MySQLWorkbench 2.app/Contents/Resources/grt
module path: /Applications/MySQLWorkbench 2.app/Contents/PlugIns:/Applications/MySQLWorkbench 2.app/Contents/Resources/plugins
library path: /Applications/MySQLWorkbench 2.app/Contents/Resources/libraries
user data dir: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench
open at start: -psn_0_5371167
open type:
run at startup:
run type:
Force SW rendering: No
Force OpenGL: No
quit when done: No
07:45:48 [INF][ WBContext]: WbContext::init
07:45:48 [INF][ WBA]: Looking for extension modules for WBA...
07:45:48 [INF][ WBA]: 0 extension modules found
07:45:48 [WRN][ grt]: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench/connections.xml:27: link 'D61B9071-5CA5-47E8-AF17-EC4DB12CA9B2' <object GrtObject> key=owner could not be resolved**
07:45:48 [INF][ WBContext]: System info:
MySQL Workbench Community (GPL) for Mac OS X version 8.0.18 CE build 15329599 (64 bit)
Configuration Directory: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench 2.app/Contents/Resources
Cairo Version: 1.10.2 OS: macOS 10.15.x Catalina x86_64 CPU: 8x Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz - 16.00GiB RAM No video adapter info available
07:45:48 [ERR][ WBContext]: Unknown file type -psn_0_5371167
07:45:59 [ERR][ GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'root'@'localhost' (using password: NO) 07:45:59 [ERR][ GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Access denied for user
'root'@'localhost' (using password: NO) 07:46:06 [ERR][SQL Editor Form]: Can't restore default schema (develop): Unknown database
'develop' 07:46:06 [ERR][SQL Editor Form]: Can't restore default schema (develop): Unknown database 'develop' 07:46:06 [INF][SQL Editor
Form]: Opened connection 'Local instance 3306' to MySQL Community Server - GPL version 8.0.18 07:46:35
[INF][wb_admin_control.py:query_server_installation_info:860]: Currently connected to MySQL server version '8.0.18', conn status = True, active plugins = ['INNODB_INDEXES', 'sha256_password', 'INNODB_CMPMEM_RESET', 'INNODB_BUFFER_POOL_STATS', 'CSV', 'mysql_native_password', 'INNODB_FT_BEING_DELETED', 'INNODB_BUFFER_PAGE', 'INNODB_CMP_PER_INDEX_RESET', 'INNODB_TABLESTATS', 'ARCHIVE', 'INNODB_FT_INDEX_CACHE', 'INNODB_CMP', 'INNODB_FT_CONFIG', 'InnoDB', 'INNODB_FT_DEFAULT_STOPWORD', 'INNODB_TRX', 'binlog', 'INNODB_TABLES', 'INNODB_COLUMNS', 'INNODB_CMPMEM', 'INNODB_FT_INDEX_TABLE', 'sha2_cache_cleaner', 'MEMORY', 'PERFORMANCE_SCHEMA', 'BLACKHOLE', 'caching_sha2_password', 'INNODB_SESSION_TEMP_TABLESPACES', 'INNODB_CACHED_INDEXES',
'TempTable', 'INNODB_VIRTUAL', 'MRG_MYISAM', 'INNODB_CMP_PER_INDEX', 'INNODB_FT_DELETED', 'mysqlx_cache_cleaner', 'INNODB_TABLESPACES',
'INNODB_METRICS', 'mysqlx', 'MyISAM', 'INNODB_TEMP_TABLE_INFO', 'INNODB_CMP_RESET', 'keyring_file', 'ngram', 'INNODB_BUFFER_PAGE_LRU']
07:46:49 [WRN][wb_admin_control.py:exec_query:623]: Error executing query SELECT name, timer_name FROM performance_schema.setup_timers:
07:47:32 [WRN][ mforms]: Resource file not found: mysql-logo-80.png
07:47:33 [WRN][ mforms]: Resource file not found: mysql-logo-80.png
07:53:38 [WRN][ mforms]: Resource file not found: db.StoredProcedure.16x16.png
07:53:38 [WRN][ mforms]: Resource file not found: db.Function.16x16.png
07:53:38 [WRN][ mforms]: Resource file not found: db.Grants.16x16.png
07:54:04 [INF][ Workbench]: Shutting down Workbench
07:54:04 [INF][ Workbench]: Workbench shutdown done ➜ log
突出显示一行,指出connections.xml无法解析。不知道此通知会产生什么影响。
任何帮助深表感谢!
感谢您的时间。
更新1:
➜ bin mysql_upgrade -u root -p
Enter password:
The mysql_upgrade client is now deprecated. The actions executed by
the upgrade client are now done by the server. To upgrade, please
start the new MySQL binary with the older data directory. Repairing
user tables is done automatically. Restart is not required after
upgrade. The upgrade process automatically starts on running a new
MySQL binary with an older data directory. To avoid accidental
upgrades, please use the --upgrade=NONE option with the MySQL binary.
The option --upgrade=FORCE is also provided to run the server upgrade
sequence on demand. It may be possible that the server upgrade fails
due to a number of reasons. In that case, the upgrade sequence will
run again during the next MySQL server start. If the server upgrade
fails repeatedly, the server can be started with the --upgrade=MINIMAL
option to start the server without executing the upgrade sequence,
thus allowing users to manually rectify the problem. ➜ bin
更新2
试图通过命令行连接到数据库,而我最好的猜测是我的数据库不见了:(
➜bin echo'export PATH = / usr / local / mysql / bin:$ PATH'>>〜/ .bash_profile
➜斌。 〜/ .bash_profile
➜bin mysql -u root -p -h 127.0.0.1开发
输入密码:
错误1049(42000):未知数据库“开发”
是否可以通过任何更改检查数据库“ develop”是否真的消失了?如果是这样,是否可以使用TimeMachine恢复它?
我不知道发生了什么,但是升级工作台已成为我的噩梦。
最佳答案
您突出显示的警告是关于文件的反序列化问题,并不严重。
您真正的问题是您无法连接。您将参数传递给Workbench 07:45:48 [ERR][ WBContext]: Unknown file type -psn_0_5371167
,它将尝试解释为连接名称。另请参阅日志文件顶部的上下文初始化值。有一个条目open at start: -psn_0_5371167
确认了我上面提到的内容。尝试不带任何参数启动Workbench。
根据this question,PSN参数是进程序列号,仅在首次启动时才传递给GUI应用程序。自下载以来,您是否曾尝试过Workbench的其他启动?
旁注:Workbench确实应该知道这样的参数并忽略它。
关于mysql - 更新到MySQL Workbench 8.0.18之后,没有显示数据库,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59420326/