Git Product home page Git Product logo

mysql-action's Introduction

Hi there 👋

I'm Mirro Mutth, you can call me "mirror" in English or "ミロ" in Japanese.

Backend Architect 🧐, Developer 🤔, Gamer 🤪, Animation/Manga Fan 🥰

Rust 🤩, Kotlin 😍, Golang 🥰, Java 😘, JavaScript/TypeScript 😍, C# 🥳

ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ•̫͡•ʕ•̫͡•ʔ•̫͡•ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ

Languages: English, Japanese, Chinese (are we talking about human language, right?)

mysql-action's People

Contributors

mirromutth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mysql-action's Issues

How to use MySQL without password?

In Docker Mysql options, there is an environment value MYSQL_ALLOW_EMPTY_PASSWORD

if this value is yes, we can use root superuser without password.

But there are no options for empty password. If I set mysql root password: '', the action needs user and password

MySQL server has gone away

I get this error from time to time:

SQLSTATE[HY000] [2006] MySQL server has gone away

I just re-run the job multiple times until it works.
This is my conf for MySQL setup:

- name: Setup MySQL
        uses: mirromutth/[email protected]
        with:
          mysql database: test
          mysql user: test
          mysql password: test

Multiple database

Could I specify multiple database to be created and allowed by the user, such as

mysql database: ['some_test', 'some2_test']

or

mysql database:
  - 'some_test'
  - 'some2_test'

I need two database to be created but I can't figure out how.

Thank you for your extension, very helpful.

How to start mysql ?

After setting up MySQL using this action,
I still cannot connect to mysql server.

Also, I checked the ports using like netstat -tnlp
There is no opened ports for MySQL.

In my django project, this error is occurred. (2003, "Can't connect to MySQL server on '0.0.0.0' (111)

How to create table?

my project's unit-test will write data to MySQL, how to create table according to DDL.sql file?

我的项目跑单测的时候会往DB里写数据,怎么通过项目里的DDL.sql文件来建表呢?现在action执行起来会报错

Repository updates and maintainership

Hey @mirromutth! Thanks for all your work on this Action - I know a lot of us use it 🙂

I can see there are a number of issues and PRs that would be good to resolve by merging some commits.

Would you be open to giving others access to the repo/transferring the repo elsewhere, in order to get some help with it?

I'd be willing to take over maintainership as we currently use my fork at Ghost.

Dump data into database

I need to dump some data into the database. How do I do that?

I suggest we have an option called dump and put in the parameter of the dump file to import the database

Access denied for user 'root'@'localhost'

Hi there.

I'm getting access denied using the following config:

test:
    runs-on: ubuntu-latest
    steps:
      - uses: mirromutth/mysql-action@master
        with:
          mysql version: '8.0'
          mysql root password: rootpass
          host port: 3889
          container port: 3889
      - run: mysql --port 3889 -u root -prootpass -e 'CREATE DATABASE IF NOT EXISTS test;'

The error is the following:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Where did I go wrong? Thanks

Database is not created

Hello,

I am trying to use your action, but the database isn't created.
Is use the following config:

      - uses: mirromutth/[email protected]
        with:
          host port: 3800 # Optional, default value is 3306. The port of host
          container port: 3307 # Optional, default value is 3306. The port of container
          character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
          collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
          mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL
          mysql database: 'test' # Optional, default value is "test". The specified database which will be create
          mysql root password: 'root' # Required if "mysql user" is empty, default is empty. The root superuser password
          mysql user: 'root' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Of course you can use secrets, too
          mysql password: 'root' # Required if "mysql user" exists. The password for the "mysql user"

I get the following error further in the process:

SQLSTATE[HY000] [1049] Unknown database 'test' (SQL: select * from information_schema.tables where table_schema = test and table_name = system_models and table_type = 'BASE TABLE')

Any idea?

Standardize Configuration Naming Convention - CamelCase or snake_case

Hello 👋,

First and foremost, I want to say a huge thank you 🙏 for your work on mirromutth/[email protected]. It has been an incredibly helpful tool that has greatly enhanced our workflow.

In using this action, I've noticed that the current configuration employs spaces in its property names, such as host port, container port, character set server, collation server, mysql version, mysql database, mysql root password, mysql user, mysql password and so on.

- uses: mirromutth/[email protected]
  with:
    host port: 3800
    container port: 3307
    character set server: 'utf8'
    collation server: 'utf8_general_ci'
    mysql version: '8.0'
    mysql database: 'some_test'
    mysql root password: ${{ secrets.RootPassword }}
    mysql user: 'developer'
    mysql password: ${{ secrets.DatabasePassword }}

This is a bit unusual 🧐 when compared to most naming conventions in programming languages or configuration schemas and could potentially lead to confusion or errors. Additionally, we've found this to be a blocker 🚧 when trying to use sbt-github-actions as it validates the YML based on these naming conventions.

Hence, I'd like to propose 📝 a small but significant improvement. Let's standardize the naming convention to something more common, like CamelCase (hostPort, containerPort, characterSetServer, collationServer, mysqlVersion, etc.) or snake_case (host_port, container_port, character_set_server, collation_server, mysql_version, etc.).

# Example in CamelCase
- uses: mirromutth/[email protected]
  with:
    hostPort: 3800
    containerPort: 3307
    characterSetServer: 'utf8'
    collationServer: 'utf8_general_ci'
    mysqlVersion: '8.0'
    mysqlDatabase: 'some_test'
    mysqlRootPassword: ${{ secrets.RootPassword }}
    mysqlUser: 'developer'
    mysqlPassword: ${{ secrets.DatabasePassword }}

# Example in snake_case
- uses: mirromutth/[email protected]
  with:
    host_port: 3800
    container_port: 3307
    character_set_server: 'utf8'
    collation_server: 'utf8_general_ci'
    mysql_version: '8.0'
    mysql_database: 'some_test'
    mysql_root_password: ${{ secrets.RootPassword }}
    mysql_user: 'developer'
    mysql_password: ${{ secrets.DatabasePassword }}

Switching to a more standardized configuration property naming could pave the way for a more intuitive and consistent developer experience 🚀.

Thank you 🙏 for your effort on this action, and I'm convinced these changes would go a long way in enhancing its usability and the overall developer experience.

Thank you for considering this proposal 📜. I'm eagerly looking forward to your thoughts on this.

Best regards,

Tushar

Laravel problems: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

Hi there,

I'm working on an Laravel project and wanted to start with GitHub Actions. Sadly I can't run the Actions because it always fails at the MySQL-Level with the following error

Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

I googled a lot and everything that works for other people failed for me.
The weird part is that the column that is mentioned is only 1027 Bytes long. I don't think an index on this single column triples that. And in all other environments everything works fine.

I added Schema::defaultStringLength(191); to the AppServiceProvider as mentioned in so many threads, changed the engine in the database config to InnoDB and InnoDB ROW_FORMAT=DYNAMIC tried to set the charset to utf8 instead if utf8mb4 and so on.

I don't really have any idea how I could get it to work.

Should automatically shutdown the Default MySQL before setup a MySQL

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/[email protected]
        with:
          redis version: "4"

      - uses: mirromutth/[email protected]
        with:
          mysql version: "5.7.17"
          mysql root password: "test"

      - uses: actions/[email protected]

      - name: Setup Ruby
        uses: actions/[email protected]
        with:
          ruby-version: 2.5.5

      - name: Install Dependencies
        run: bundle install

      - name: Setup Database
        env:
          RAILS_ENV: test
          DATABASE_URL: mysql2://root:[email protected]/test
        run: bundle exec rake db:create db:schema:load --trace

      - name: Run Tests
        env:
          RAILS_ENV: test
          DATABASE_URL: mysql2://root:[email protected]/test
        run: bundle exec rspec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.