appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

MySQL 8.0 service not started in the latest Visual Studio 2022 image #3894

Open BAndysc opened 7 months ago

BAndysc commented 7 months ago

The latest VS 2022 image includes MySQL 8.0 instead of 5.7, however it looks like the service is not working despite having mysql service enabled in the yml as per docs (or the credentials to the database were changed?) At least this command:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p'Password12!' -e 'DROP DATABASE IF EXISTS temp_CI'

used to work before and now

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -u root -p'Password12!' -e 'DROP DATABASE IF EXISTS temp_CI'

yields

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)
OwenMcDonnell commented 7 months ago

Can you try after adding the following to your appveyor.yml config file.

init:
  - ps: Start-Service MySQL80
BAndysc commented 7 months ago

Thanks for the answer, yup, this worked whereas service: - mysql didn't. Not sure if that's a bug or not.