What do i have to check in virtualmin settings to be sure that php scripts on virtual server can get access to mysql.
Now it looks like i can connect to mysql locally, open database etc, but php script does not have the connection with the same user name and password.
yes I can restore but i need 5.6… it is a long story
I had an old laravel app. Without support already.
It cannot work on mysql 8 because of ‘only_full_group_by’ issue.
First i tried to change sql_mode and delete ‘only_full_group_by’ from there. It looked nice and i can successfully execute the query with the problem in the console and the server shows me the updated sql_mode without ‘only_full_group_by’ but the application still saw ‘only_full_group_by’ somewhere and was not able to work… i spent hours to find the reason…
So the downgrade to 5.6 was my idea how to solve my problem… but…
I think i missed some settings in virtualmin or somewhere else but i don’t know how to find it
well you realise that virtualmin is one thing and sql server is another thing. Also if the installation was successful you should not have any issues.
Anyway I think if you cannot update the app but you need it to run for whatever reason, do not run it on production server as that could be quiet dangerous. Have totally separate server for outdated things somewhere on local network or something so you can stay safe.
you can remove ONLY_FULL_GROUP_BY from mysql console like this:
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Or to just disable it:
mysql> SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
This will remove this mode from MySQL without affecting the others.
You may need to edit your /etc/my.cnf file as well to ensure this change holds. Look for the line that says sql_mode= and remove only_full_group_by, then restart MySQL.
Conversely, if this mode is disabled and you want to enable it, just follow these steps in reverse. The MySQL command will be:
mysql> SET sql_mode=(SELECT CONCAT(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
You’ll also want to add in or uncomment only_full_group_by to /etc/my.cnf and restart MySQL.
This should work on sql8 too. I hope that somehow make sense to you and helps
thank you for your advices and your time.
I think I can try again to follow this recommendations even yesterday i did the same without the result. I don’t know why but the application thought that the mysql was still in only_full_group_by mode but server shown that it is not true…
That is why I thought that virtualmin maybe create any special reality for my application
I think I found the solution for my application.
So I return to mysql 8 and disable only_full_group_by.
Thanks to everybody who tried to help me.
PS bdw the reason with the php no connection issue was in wrong settings for socket. The connection works for 127.0.0.1. But I don’t know where was my mistake because I found another solution for the initial issue and had no reason for any other investigation.