question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should automatically shutdown the Default MySQL before setup a MySQL

See original GitHub issue

I get this error when I try to setup a mysql instance in my Actions workflow. Any idea what I’m doing wrong?

docker: Error response from daemon: driver failed programming external connectivity on endpoint busy_mcnulty (e90f9b113c26a0772d43fe413b6c5755204a5459a16817a6ff398ca003a859ee): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use.

Here’s my workflow:

jobs:
  ruby:
    name: Ruby Tests
    runs-on: ubuntu-latest
    steps:
      - uses: zhulik/redis-action@v1.0.0
        with:
          redis version: "4"

      - uses: mirromutth/mysql-action@v1.1
        with:
          mysql version: "5.7.17"
          mysql root password: "test"

      - uses: actions/checkout@v1.0.0

      - name: Setup Ruby
        uses: actions/setup-ruby@v1.0.0
        with:
          ruby-version: 2.5.5

      - name: Install Dependencies
        run: bundle install

      - name: Setup Database
        env:
          RAILS_ENV: test
          DATABASE_URL: mysql2://root:test@127.0.0.1/test
        run: bundle exec rake db:create db:schema:load --trace

      - name: Run Tests
        env:
          RAILS_ENV: test
          DATABASE_URL: mysql2://root:test@127.0.0.1/test
        run: bundle exec rspec

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
mazzaritocommented, Oct 3, 2019

@keyflight @fbjork Just found this out: looks like mysql is already installed on ubuntu (version 5.7) with root user password “root”. Actually quite a bit of software is available:

https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts

All you need to do is create your database like so:

    - name: Create DB
      run: mysql -uroot -proot -e "CREATE DATABASE dbname;"
0reactions
knowletcommented, May 25, 2021

GitHub Actions Breaking Change: Starting March 3rd, 2020, the Ubuntu virtual environments will no longer start the MySQL service automatically.

https://github.com/actions/virtual-environments/issues/375

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.3 mysql.server — MySQL Server Startup Script
mysql.server stop stops the server by sending a signal to it. You can also stop the server manually by executing mysqladmin shutdown. To...
Read more >
2.10.5 Starting and Stopping MySQL Automatically
On Windows, you can set up a MySQL service that runs automatically when Windows starts. ... This script is used primarily at system...
Read more >
1.4.8 Starting MySQL as a Windows Service
Before installing MySQL as a Windows service, you should first stop the current server if it is running by using the following command:...
Read more >
2.3.4.6 Starting MySQL from the Windows Command Line
You can stop the MySQL server by executing this command: C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin" -u root shutdown.
Read more >
2.5.9 Managing MySQL Server with systemd
systemd provides automatic MySQL server startup and shutdown. It also enables manual server management using the systemctl command. For example:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found