Openssl < 3 :
openssl pkcs12 -in star_site_net.pfx -clcerts -nodes -out star_site_net.pem
openssl pkcs12 -in star_site_net.pfx -nocerts -nodes -out star_site_net.key
Openssl > 3 :
openssl pkcs12 -in star_site_net.pfx -clcerts -nodes -provider legacy -provider default -out star_site_net.pem
openssl pkcs12 -in star_site_net.pfx -nocerts -nodes -provider legacy -provider default -out star_site_net.key
Links:
https://www.entrust.com/knowledgebase/ssl/how-do-i-convert-a-pfx-to-be-used-with-an-apache-server
Script tested on Rocky Linux 8.9 and mysql 8.0.36
export MYSQL_VERSION="8.0.36"
dnf install git cmake3 gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc elfutils openssl-devel
ncurses-devel libtirpc-devel patch automake libtool mysql-devel libudev-devel bison curl-devel python2 -y
dnf -y --enablerepo=powertools install rpcgen
scl enable gcc-toolset-12 bash
wget -q -N https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-${MYSQL_VERSION}.tar.gz -O mysql-boost-${MYSQL_VERSION}.tar.gz
git clone https://github.com/trellix-enterprise/mysql-audit.git
cd mysql-audit
git checkout tags/v1.1.13
tar zxvf ../mysql-boost-${MYSQL_VERSION}.tar.gz
cd mysql-${MYSQL_VERSION}
cmake3 -DFORCE_INSOURCE_BUILD=ON -DWITH_BOOST=boost .
make -j`nproc --all` -C libservices
make -j`nproc --all` -C include
cd ..
perl -pi -e 's/TABLE_LIST/Table_ref/g' `grep -rlw TABLE_LIST include/ src/ offset-extract/`
cd src
patch --verbose --ignore-whitespace audit_handler.cc << EOF --- audit_handler.cc 2024-01-24 17:19:37.247677405 +0000 +++ audit_handler.cc.2 2024-01-24 17:23:21.295862210 +0000 @@ -841,7 +841,7 @@ const char *well_formed_error_pos = NULL, *cannot_convert_error_pos = NULL, *from_end_pos = NULL; copy_length = well_formed_copy_nchars( - &my_charset_utf8_bin + &my_charset_utf8mb4_bin , dest , dest_size , from_cs @@ -1089,7 +1089,7 @@ #if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504 &my_charset_utf8mb3_general_ci, #else - &my_charset_utf8_general_ci, + &my_charset_utf8mb4_general_ci, #endif query, qlen, col_connection, & errors); EOFcd ..
chmod +x bootstrap.sh
./bootstrap.sh
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-${MYSQL_VERSION} --with-mysql-libservices=mysql-${MYSQL_VERSION}/libservices/libmysqlservices.a
perl -pi -e 's/automake-1.15/automake/g' pcre/Makefile
perl -pi -e 's/aclocal-1.15/aclocal/g' pcre/Makefile
alternatives --config python
make -j`nproc --all`
ls -la src/.libs
and finally: cp src/.libs/libaudit_plugin.so* /usr/lib64/mysql/plugin/
Issue and discussion:
https://github.com/trellix-enterprise/mysql-audit/issues/261
One more mention:
mysqldump <db_name> <table_name> --where="extension_id=727" > outfile.sql
version: '3.9'
services:
redmine:
image: redmine:5.0
restart: always
depends_on:
- mysql-redmine
ports:
- 8090:3000
volumes:
- /srv/redmine-files:/usr/src/redmine/files
- /srv/redmine-logs:/var/log/redmine
environment:
- TZ=Europe/Kyiv
- REDMINE_DB_MYSQL=mysql-redmine
# - REDMINE_DB_USER=redmine
# - REDMINE_DB_PASSWORD=somepassword
- REDMINE_DB_PASSWORD=supermegapassword
- REDMINE_SECRET_KEY_BASE=supersecretkey
networks:
redmine:
mysql-redmine:
image: mysql:8.0
restart: always
environment:
- MYSQL_ROOT_PASSWORD=supermegapassword
- MYSQL_DATABASE=redmine
- MYSQL_USER=redmine
- MYSQL_PASSWORD=somepassword
networks:
redmine:
networks:
redmine:
driver: bridge