Giter Club home page Giter Club logo

mariadb / mariadb.org-tools Goto Github PK

View Code? Open in Web Editor NEW
53.0 53.0 51.0 13.43 MB

This project collects together various small scripts or projects that are used for MariaDB development, but for one reason or another do not make sense to keep inside the main MariaDB source tree.

Python 12.08% Shell 11.77% C++ 0.07% Perl 5.29% HTML 0.25% Batchfile 0.02% Makefile 0.10% C 0.13% Lua 0.15% PHP 0.09% Dockerfile 0.12% GDB 0.14% Jupyter Notebook 69.63% BitBake 0.18%

mariadb.org-tools's People

Contributors

abychko avatar an3l avatar cvicentiu avatar dbart avatar dr-m avatar elenst avatar ericherman avatar fauust avatar grooverdan avatar henrikingo avatar iangilfillan avatar illuusio avatar istiak101 avatar knielsen avatar linuxjedi avatar ottok avatar rasmushoj avatar robertbindar avatar sanja-byelkin avatar shinnok avatar spetrunia avatar vaintroub avatar vlad-lesin avatar vladbogo avatar vuvova 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

Watchers

 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

mariadb.org-tools's Issues

Windows builds

Hi,

i don't know if this place is right place to post this.

In ci.maradb.org there are several builds centos, rhel, linux, etc.. but for windows it doesn't show anything. Can you check this?

Consider installing build dependencies on the fly

All the Docker images install the build dependencies by first getting the existing build dependencies and then adding some manually defined ones on top. These are created on the fly then the Docker images update. Example: https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/dockerfiles/ubuntu-1804.dockerfile#L16-L26

Instead of maintaining the dependencies manually, consider doing something similar I do my Debian test images:

RUN curl -skO https://salsa.debian.org/mariadb-team/mariadb-10.1/raw/stretch/debian/control
RUN DEBIAN_FRONTEND=noninteractive mk-build-deps -r -i control \
    -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends'

This downloads the debian/control file, and then automatically installs whatever was defined in it. I am not sure if it always makes sense to use this, but I thought I'd share the tip with you in case you want to use it.

aria_chk is rotten

Using MariaDb with Xampp my MariaDB wouldn't start anymore after a Windows update. I got the error:

2022-02-01 12:24:57 0 [ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files 2022-02-01 12:24:57 0 [ERROR] Plugin 'Aria' init function returned error. 2022-02-01 12:24:57 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.

Running aria_chk -r I saw a lot of messages that tables have been resized from 0 to something else. For example
mysql.columns_priv warning : Number of rows changed from 0 to 29 status : OK
The size of those tabes was reduced.

After that nothing worked. After some manipulations I could open Phpmyadmin and see the tables. But I couldn't see their content or manipulate them.

As it is now I believe that aria_chk might better be described as aria_destroy...

Broken today

net14 # uname -a
Linux net14.faststablehosting.com 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

net14 # lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

net14 # curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --skip-maxscale
[warning] Found existing file at /etc/apt/sources.list.d/mariadb.list. Moving to /etc/apt/sources.list.d/mariadb.list.old_2.
[info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list
[info] Adding trusted package signing keys...
[info] Running apt-get update...
E: Repository 'https://downloads.mariadb.com/Tools/ubuntu bionic InRelease' changed its 'Origin' value from 'MariaDB Enterprise' to 'MariaDB Enterprise Tools'
[error] Failed to add trusted package signing keys.

Access denied for user 'shibboleth'@'%' to database 'shibboleth'

hallo

I am following your tutorial to run a How to replicate MariaDB in K8s.

This is my configuration file

when I try to connect a database to my web app running in Kubernetes which shibboleth it gives me an error

Access denied for user 'shibboleth'@'%' to database 'shibboleth.'

this is basically a permission issue from a database side

it would be good if you help me

# ConfigMap holding information about configuration files for primary/secondary and dockerinit
apiVersion: v1
kind: ConfigMap
metadata:
  name: mariadb-configmap
data:

  primary.cnf: |
    [mariadb]
    log-bin                         # enable binary logging
    log-basename=my-mariadb         # used to be independent of hostname changes (otherwise is in datadir/mysql)

  replica.cnf: |
    [mariadb]
    log-basename=my-mariadb         # used to be independent of hostname changes (otherwise is in datadir/mysql)

  primary.sql: |
    CREATE USER 'repluser'@'%' IDENTIFIED BY 'replsecret';
    GRANT REPLICATION REPLICA ON *.* TO 'repluser'@'%';
    SET NAMES 'utf8';
    SET CHARACTER SET utf8;
    CHARSET utf8;
    CREATE DATABASE IF NOT EXISTS shibboleth CHARACTER SET=utf8;
    USE shibboleth;

    CREATE TABLE IF NOT EXISTS StorageRecords (
    context varchar(255) NOT NULL,
    id varchar(255) NOT NULL,
    expires bigint(20) DEFAULT NULL,
    value longtext NOT NULL,
    version bigint(20) NOT NULL,
    PRIMARY KEY (context, id)
    ) COLLATE utf8_bin;

    CREATE TABLE IF NOT EXISTS shibpid (
    localEntity VARCHAR(255) NOT NULL,
    peerEntity VARCHAR(255) NOT NULL,
    persistentId VARCHAR(50) NOT NULL,
    principalName VARCHAR(50) NOT NULL,
    localId VARCHAR(50) NOT NULL,
    peerProvidedId VARCHAR(50) NULL,
    creationDate TIMESTAMP NOT NULL,
    deactivationDate TIMESTAMP NULL,
    PRIMARY KEY (localEntity, peerEntity, persistentId)
    );
    CREATE USER 'shibboleth'@'localhost' IDENTIFIED BY 'psltest';
    GRANT ALL PRIVILEGES ON shibboleth.* TO 'shibboleth'@'localhost';
    FLUSH PRIVILEGES;

  secondary.sql: |
    # We have to know name of sts (`mariadb-sts`) and 
    # service `mariadb-service` in advance as an FQDN.
    # No need to use master_port
    CHANGE MASTER TO 
    MASTER_HOST='mariadb-sts-0.mariadb-service.default.svc.cluster.local',
    MASTER_USER='repluser',
    MASTER_PASSWORD='replsecret',
    MASTER_CONNECT_RETRY=10;

# Secret holds information about root password
---
apiVersion: v1
kind: Service
metadata:
  name: mariadb-service
  labels:
    app: mariadb
spec:
  ports:
  - port: 3306
    name: mariadb-port
  clusterIP: None
  selector:
    app: mariadb

# Statefulset
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mariadb-sts
spec:
  serviceName: "mariadb-service"
  replicas: 2
  selector:
    matchLabels:
      app: mariadb
  template:
    metadata:
      labels:
        app: mariadb
    spec:
      initContainers:
      - name: init-mariadb
        image: mariadb
        imagePullPolicy: Always
        command:
        - bash
        - "-c"
        - |
          set -ex
          echo 'Starting init-mariadb';
          # Check config map to directory that already exists 
          # (but must be used as a volume for main container)
          ls /mnt/config-map
          # Statefulset has sticky identity, number should be last
          [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
          ordinal=${BASH_REMATCH[1]}
          # Copy appropriate conf.d files from config-map to 
          # mariadb-config volume (emptyDir) depending on pod number
          if [[ $ordinal -eq 0 ]]; then
            # This file holds SQL for connecting to primary
            cp /mnt/config-map/primary.cnf /etc/mysql/conf.d/server-id.cnf
            # Create the users needed for replication on primary on a volume
            # initdb (emptyDir)
            cp /mnt/config-map/primary.sql /docker-entrypoint-initdb.d
          else
            # This file holds SQL for connecting to secondary
            cp /mnt/config-map/replica.cnf /etc/mysql/conf.d/server-id.cnf
            # On replicas use secondary configuration on initdb volume
            cp /mnt/config-map/secondary.sql /docker-entrypoint-initdb.d
          fi
          # Add an offset to avoid reserved server-id=0 value.
          echo server-id=$((3000 + $ordinal)) >> etc/mysql/conf.d/server-id.cnf
          ls /etc/mysql/conf.d/
          cat /etc/mysql/conf.d/server-id.cnf
        volumeMounts:
          - name: mariadb-config-map
            mountPath: /mnt/config-map
          - name: mariadb-config
            mountPath: /etc/mysql/conf.d/
          - name: initdb
            mountPath: /docker-entrypoint-initdb.d
      restartPolicy: Always
      containers:
      - name: mariadb
        image: mariadb
        ports:
        - containerPort: 3306
          name: mariadb-port
        env:
        - name: MARIADB_USER
          value: shibboleth
        - name: MARIADB_DATABASE
          value: shibboleth
        # Using Secrets
        - name: MARIADB_ROOT_PASSWORD
          value: psltest
        - name: MYSQL_INITDB_SKIP_TZINFO
          value: "1"
        # Mount volume from persistent volume claim
        volumeMounts:
        - name: datadir
          mountPath: /var/lib/mysql/
        - name: mariadb-config
          mountPath: /etc/mysql/conf.d/
        - name: initdb
          mountPath: /docker-entrypoint-initdb.d
      volumes:
      - name: mariadb-config-map
        configMap:
          name: mariadb-configmap
          #defaultMode: 0544
      - name: mariadb-config
        emptyDir: {}
      - name: initdb
        emptyDir: {}

  volumeClaimTemplates:
  - metadata:
      name: datadir
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: ionos-enterprise-ssd
      resources:
        requests:
          storage: 10Gi

MariaDB-Shell-23.03.2.mac.x86_64.pkg is broken

Hi there,

So I proceeded to install mariadb-shell for macOS, following MariaDB's instructions downloaded from mariadb's downloads and installed.

When running mariadb-shell, I get the following:

 % mariadb-shell
Traceback (most recent call last):
  File "/Users/lizardo/.pyenv/versions/3.10.10/lib/python3.10/site-packages/cx_Freeze/initscripts/__startup__.py", line 131, in run
  File "/Users/lizardo/.pyenv/versions/3.10.10/lib/python3.10/site-packages/cx_Freeze/initscripts/console.py", line 16, in run
  File "sealion/__main__.py", line 5, in <module>
  File "/Users/lizardo/workspace/sealion/sealion/app.py", line 14, in <module>
  File "/Users/lizardo/workspace/sealion/sealion/commands.py", line 9, in <module>
  File "/Users/lizardo/.pyenv/versions/3.10.10/lib/python3.10/site-packages/mariadb/__init__.py", line 7, in <module>
ImportError: dlopen(/Library/MariaDB/shell/lib/mariadb/_mariadb.cpython-310-darwin.so, 0x0002): Library not loaded: '/usr/local/Cellar/[email protected]/1.1.1t/lib/libcrypto.1.1.dylib'
  Referenced from: '/Library/MariaDB/shell/libssl.1.1.dylib'
  Reason: tried: '/usr/local/Cellar/[email protected]/1.1.1t/lib/libcrypto.1.1.dylib' (no such file), '/usr/lib/libcrypto.1.1.dylib' (no such file)

There's no /Users/lizardo/ nor any /usr/local/Cellar nor /usr/lib/libcrypto.1.1.dylib - there isn't, in fact, such file.
There is, however, a libcrypto.1.1.dylib that was supplied by your package and put into /Library/MariaDB/shell/libcrypto.1.1.dylib.

I could link /usr/lib/xpto to the provided library, but I'll use another machine until a fix is released. Thank you.

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.