Bug on installation

arodierarodier EntrantActive Member Participant
Hello,

First, thank you for your hard work in making mysql working better with Debian, I am new to Percona mysql server, but I like it.
One annoyance, though.
I have a machine with a dedicated partition for MySQL, mounted on /var/lib/mysql/
When I install perconna, manually, it complains that the directory exists, even if it is empty (except maybe lost+found)
When I try the installation using my Ansible provisioning script, it completely fails, waiting for an answer, even if ansible is set up to non-interactive.
-bash: /var/lib/mysql/.bash_profile: Permission denied
mysqld: Can't create directory '/var/lib/mysql/' (Errcode: 17 - File exists)
2019-12-02T15:07:39.022204Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2019-12-02T15:07:39.022232Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2019-12-02T15:07:39.024186Z 0 [ERROR] Aborting

I am very close to finish this task, thank you for your time, and again, for your hard work!

Comments

  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Admin Admin
    Can I just check in with you on what version you're installing please?
  • arodierarodier Entrant Active Member Participant
    Hello Lorraine, thanks for the answer! the latest version, on Debian Buster, i.e. 5.7

    I think I found the exact issue:

    Since I use a partition for /var/lib/mysql, the directory already exists, is mounted and belongs to root. The permissions are '0755'
    The installer place the files in this folder, but the daemon fail to start, with a cryptic error message:
    mysqld[19638]: Unable to determine if daemon is running: No such file or directory
    

    If I manually set the permissions to 0777, they are changed to 0755 by the installation script. Good, but the owner is not checked by the installation script.

    However, if I change the directory permissions after the installation, and then restart the service manually, it works like a charm.

    Therefore, IMHO, this is what should happen in the pre-installation script: Once the mysql user is created, the owner of the folder should be set to mysql:mysql before trying to start the server.

    The way I have found to solve the problem, is to "guess" the uid/gid of the mysql user that will be created, and then, start the installation.

    This is not practical, though.

    Thanks again for your patience!

    André
  • arodierarodier Entrant Active Member Participant
    Helo, Lorraine,

    In fact, this is worse than I expected. My script works as expected, i.e. set the owner to mysql/mysql before the installation of percona package. But then, in the middle of the installation, the folder permissions are set again to root:root !

    I hope this will be helpful
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Admin Admin
    Thank you for the update, I'll see if I can find someone to help with this.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.