Code Monkey home page Code Monkey logo

Comments (5)

marcovc avatar marcovc commented on September 1, 2024

I had exactly the same issue. I don't remember exactly what I did to solve it, but it involved changing the scripts in the /bin directory. If you're interested I can try to diff them with the current version.

from docker-percona_galera.

kosztyua avatar kosztyua commented on September 1, 2024

I would really appreciate that :) I was considering the FLUSH PRIVILEGES may have that effect, as that is the only which does not have wsrep off

from docker-percona_galera.

marcovc avatar marcovc commented on September 1, 2024

It appears the current version has changed significatively from the version I have. Anyways, my problem was in the bin/functions/init_database() function. For some reason starting mysql twice (the first time just to setup passwords) for an existing database was triggering the error you mentioned. I removed that funcionality since I don't really need the scripts to reset passwords dynamically and it has been running great ever since. My version is the following (watch out for the SRC_PATH env variable which is mine).

`function init_database() {

chown -R mysql:mysql /var/lib/mysql
touch /var/log/mysql/error.log
tail ---disable-inotify -F /var/log/mysql/error.log &
if [[ ! -d /var/lib/mysql/mysql ]]; then
echo "==> An empty or uninitialized database is detected in /var/lib/mysql"
echo "-----> Creating database..."
mysql_install_db > /dev/null 2>&1
echo "==> starting mysql in order to set up passwords"
mysqld_safe --skip-syslog --verbose &
echo "-----> sleeping for 20 seconds, then testing if DB is up"
sleep 20
while [[ -z $(netstat -lnt | awk "$6 == "LISTEN" && $4 ~ ".$PUBLISH" && $1 ~ "$PROTO.?"") ]] ; do sleep 1; done
[[ -z $HOST ]] && mysql_creds || ${SRC_PATH}/bin/database_creds
echo "==> stopping mysql after setting up passwords"
mysqladmin shutdown
echo "-----> Done!"
else
echo "-----> Using an existing database"
fi
}`

from docker-percona_galera.

kosztyua avatar kosztyua commented on September 1, 2024

Thank you, I'll test it and report back!

from docker-percona_galera.

kosztyua avatar kosztyua commented on September 1, 2024

Tested both removing init_database() and adding SET wsrep_on=OFF to FLUSH PRIVILEGES, and both worked fine! Creating a pull request for the later, as it can be a general solution :)
Thank you for the help!

from docker-percona_galera.

Related Issues (13)

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.