[CPANEL-22282] No MySQL for clients on MariaDB 10.2
Hello! i just upgraded from mysql 5.6 --> mysql 5.7 --> MariaDB 10.2
Everything works fine except mysql command in terminal for users.
Also: /etc/my.cnf
52831 52835
[root@data ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 18
Server version: 10.2.15-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
[root@data ~]# su veto
[veto@data ~]$ mysql
mysql: Can't read dir of '/etc/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
Also: /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]
log-error=/var/lib/mysql/data.lunaserver.gr.err
performance-schema=0
innodb_file_per_table=1
default-storage-engine=MyISAM
max_allowed_packet=268435456
open_files_limit=14000
52831 52835
-
Hi, mysql: Can't read dir of '/etc/my.cnf.d' (Errcode: 2 "No such file or directory")
I am not sure what you are doing but when you login into the user, you have to give the -u and -p paramter and enter the appropriate username and password to connect to the database.. Also, from the error you reported, it appears that the user has no read access to the mentioned file to login. Check if it does..0 -
Hi, I am not sure what you are doing but when you login into the user, you have to give the -u and -p paramter and enter the appropriate username and password to connect to the database.. Also, from the error you reported, it appears that the user has no read access to the mentioned file to login. Check if it does..
Hello and thank you for your prompt reply! In mysql 5.6 i was able to open the mysql terminal via root and user profile. Now after the upgrade, (MariaDB 10.2) i am able to open the mysql terminal only via root user. The result is:[veto@data ~]$ mysql -u veto --password='PASSWORD' veto_products
With --no-defaults WORKS FINE!!!mysql --no-defaults -u veto --password='PASSWORD' veto_products
Thinking that the problem is my.cnf file. Any idea how i should fix it to work correctly? I want to be able to run my mysql cron jobs again via clients cpanel. About the permissions: 52851 52855 And this is my.cnf file: 52859 528630 -
Hi, Login to the user and perform below steps: cat /etc/my.cnf mysql -u -p --> and then hit enter. Enter the password when prompted. 0 -
Hi, Login to the user and perform below steps: cat /etc/my.cnf mysql -u -p --> and then hit enter. Enter the password when prompted.
52875 With --no-defaults the command works 52879 Thanks0 -
The problem is the /etc/my.cnf file! After the Upgrade from Mysql to MariaDB you should change the 52883 Steps: " I renamed the my.cnf to my.cnf.old " I restarted the Mysql " New my.cnf file re-created automatically " I edit the file with my personal mysqld configurations. Now it works. 0 -
Hi @Clud7 I'm happy to hear you found the solution to this issue though I wonder if there was some further customization done to your /etc/my.cnf file as I haven't needed to do this on a mysql -> MariaDB switch or upgrade. Thanks for letting us know what fixed the issue! 0 -
Hi @Clud7 I'm happy to hear you found the solution to this issue though I wonder if there was some further customization done to your /etc/my.cnf file as I haven't needed to do this on a mysql -> MariaDB switch or upgrade. Thanks for letting us know what fixed the issue!
Hello! My /etc/my.cnf file was the default one. 528870 -
Hi @Clud7 Thank you for that, what were the permissions and ownership of it? The default provided by cPanel looks like: [root@server php-fpm]# cat /etc/my.cnf [mysqld] innodb_file_per_table=1 default-storage-engine=MyISAM performance-schema=0 max_allowed_packet=268435456 open_files_limit=2048 general-log general-log-file=queries.log log-output=file
Not much involved nor does it specify the log dir. It does look like yours is also specifically including the dir you were experiencing issues with on line 10 which isn't present in the default my.cnf file. Thanks!0 -
Hi @Clud7 Thank you for that, what were the permissions and ownership of it? The default provided by cPanel looks like:
[root@server php-fpm]# cat /etc/my.cnf [mysqld] innodb_file_per_table=1 default-storage-engine=MyISAM performance-schema=0 max_allowed_packet=268435456 open_files_limit=2048 general-log general-log-file=queries.log log-output=file
Not much involved nor does it specify the log dir. It does look like yours is also specifically including the dir you were experiencing issues with on line 10 which isn't present in the default my.cnf file. Thanks!
Unfortunately i have the new /etc/my.cnf but i can confirm that the permissions and ownership for the old file my.cnf was the same as the new. We had to update the mysql 5.6 to MariaDB 10.2 because of the GDPR so the file was untouched from May 2017 till now 52903 Also some info about our Server: 529070 -
Hi @Clud7 I believe the issue was due to the specified inclusion of the directory in the old my.cnf From my previous post: [QUOTE]It does look like yours is also specifically including the dir you were experiencing issues with on line 10 which isn't present in the default my.cnf file.
While that directory exists it's not specifically included in the my.cnf file on default installations. Is it present on the current new my.cnf file? Thanks!0 -
Hi @Clud7 I believe the issue was due to the specified inclusion of the directory in the old my.cnf From my previous post: While that directory exists it's not specifically included in the my.cnf file on default installations. Is it present on the current new my.cnf file? Thanks!
The new auto-created my.cnf file was exactly like the image below: 52963 After i added everything from my old my.cnf like below (except the !includedir /etc/my.cnf.d) 52967 After that: All the cronjobs started and my users have full access to mysql command like: mysql -u USERNAME --password='PASSWORD' 100% Success.0 -
Hi @Clud7 That's great, thank you for posting exactly what worked for you! 0 -
HI @Clud7 I wanted to mention here as it was brought to my attention today that MariaDB is adding this directive automatically: $ grep include /etc/my.cnf # include all files from the config directory !includedir /etc/my.cnf.d
The issue being that libvirtfs.c does not include /etc/my.cnf.d as a virtual mount which in turn causes accounts with jailshell to experience the above issue. To rectify this we've got an internal case open CPANEL-22282 I'll update here when the case has been implemented or if any new important information becomes available. Thanks!0 -
As a temporary work around, could you add /etc/my.cnf.d into the file /var/cpanel/jailshell-additional-mounts Would that work? 0 -
Hi @sparek-3 It would work I did tested it on my test server though and confirmed I no longer get the error: # cat /var/cpanel/jailshell-additional-mounts /etc/my.cnf.d
Then accessing the user and mysql:[root@server ~]# su lauren [lauren@server ~]$ mysql -ulauren -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 78 Server version: 10.2.17-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> exit Bye
For those unaware we have documentation on this here:0 -
I thought you could just put the directory name in that file and it would apply to all users? Perhaps you have to unmount all of the virtfs mounts in order to get jailshell to remount everything? cat /proc/mounts | awk '{print $2}' | grep /home/virtfs | xargs -n1 umount (you may have to run this several times to force all virtfs to unmount) Then when you initiate a new jailshell does it mount everything, including the directories listed in /var/cpanel/jailshell-additional-mounts? I've never appended the username to additional mount points in /var/cpanel/jailshell-additional-mounts 0 -
Hi @sparek-3 You're correct, I just tested without the username and it does continue to work - I've edited my post accordingly. Thanks for the correction. For my testing I didn't have to manually mount/umount anything that was added to /var/cpanel/jailshell-additional-mounts was automatically mounted to /home/virtfs/ 0 -
HI @Clud7 I wanted to mention here as it was brought to my attention today that MariaDB is adding this directive automatically:
$ grep include /etc/my.cnf # include all files from the config directory !includedir /etc/my.cnf.d
The issue being that libvirtfs.c does not include /etc/my.cnf.d as a virtual mount which in turn causes accounts with jailshell to experience the above issue. To rectify this we've got an internal case open CPANEL-22282 I'll update here when the case has been implemented or if any new important information becomes available. Thanks!
Great news! So the MySQL upgrade works fine and you only have to update the /var/cpanel/jailshell-additional-mounts. Thanks a lot!0 -
To add to that @Clud7 while yes this is a viable workaround for now, we're also going to keep it from occurring in the first place so you don't have to implement a workaround. 0 -
Hello and thank you for your prompt reply! In mysql 5.6 i was able to open the mysql terminal via root and user profile. Now after the upgrade, (MariaDB 10.2) i am able to open the mysql terminal only via root user. The result is:
[veto@data ~]$ mysql -u veto --password='PASSWORD' veto_products
With --no-defaults WORKS FINE!!!mysql --no-defaults -u veto --password='PASSWORD' veto_products
Thinking that the problem is my.cnf file. Any idea how i should fix it to work correctly? I want to be able to run my mysql cron jobs again via clients cpanel. About the permissions: 52851 52855 And this is my.cnf file: 52859 52863
Helpful0
Please sign in to leave a comment.
Comments
21 comments