所以昨天我正在做我的项目,一切都很顺利,所以我就去睡觉了。我醒来,做完我的事情,当我尝试运行 apache 和 mysql (通过 xampp)时,apache 确实启动了,但 mysql 显示了这样的错误:
Error: MySQL shutdown unexpectedly.
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper privileges, a crash, or a shutdown by another method.
[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues
[mysql] If you need more help, copy and post this
[mysql] entire log window on the forums
从昨天开始我什么都没做,所以我不知道出了什么问题。另外,我检查了 Windows 事件查看器,并得出了这些结果:
Warning
Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--log-basename=#' or '--relay-log=mysql-relay-bin' to avoid this problem.
Error (this one repeats itself couple of times)
Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
Error
Failed to create a new master info file (file 'D:\Programs\xampp\mysql\data\master-2019@002d12@002d27@002020@003a50@003a29@00209@0020@005berror@005d@0020mysqld@002eexe@003a@0020table@0020@0027@002e@005clsslspd@005cwqhndjvxchcv_users@0027@0020is@0020marked@0020as@0020crashed@0020and@0020should@0020be@[email protected]', errno 2)
Error
Initialized Master_info from 'master-2019@002d12@002d27@002020@003a50@003a29@00209@0020@005berror@005d@0020mysqld@002eexe@003a@0020table@0020@0027@002e@005clsslspd@005cwqhndjvxchcv_users@0027@0020is@0020marked@0020as@0020crashed@0020and@0020should@0020be@[email protected]' failed
Error
Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
Error
Failed to create a new master info file (file 'D:\Programs\xampp\mysql\data\master-2019@002d12@002d27@002022@003a53@003a23@0020125@0020@005bwarning@005d@0020aborted@0020connection@0020125@0020to@0020db@003a@0020@0027lsslspd@0027@0020user@003a@0020@0027root@0027@0020host@003a@0020@0027localhost@0027@0020@0028got@0020an@0020error@0020reading@0020communication@0020packets@[email protected]', errno 2)
最后两个错误交替重复 4 次(但值略有不同)
你们能帮我解决这个问题吗?我不想丢失所有数据。已经尝试重新安装并复制 mysql->data 的内容,但它不起作用。
在
mysql
未启动的情况下,检查是否存在xampp/mysql/data/multi-master.info
文件,并将其删除。这对我有用。
我昨天刚刚遇到这种情况,从 xampp/mysql/data/ 中删除 multi-master.info 文件对我有用。谢谢!