MySQL database failed! : DBD::mysql::st fetchrow failed: fetch() without execute() at /usr/libexec/webmin/mysql/mysql-lib.pl line 317.

Hello,

I am using Virtualmin 5.04gpl on Centos 7.3 with mysql 5.6.35 from official mysql repos on a fresh VPS server.

I get the following error when I create a new virtual server:

Creating MySQL login ..


.. MySQL database failed! : DBD::mysql::st fetchrow failed: fetch() without execute() at /usr/libexec/webmin/mysql/mysql-lib.pl line 317.

and the mysql feature is not enabled by default for the virtual server however if I edit the virtual server and enable Mysql feature for it and then save it, mysql enables properly.

Status: 
Active

Comments

So you're saying this only happens at domain creation time?

Mostafa's picture
Submitted by Mostafa on Thu, 12/22/2016 - 22:53

Thank you Jamie for your reply,

Yes! This is a very strange issue. I have removed all mysql packages and installed default mariadb server from centos 7 base repo and also removed /var/lib/mysql as well as /etc/my.cnf and run mysql_install_db, the issue is still there and it happens when creating a new virtual server (or removing it)

Mostafa's picture
Submitted by Mostafa on Thu, 12/22/2016 - 23:10

I just found the issue!!

The issue comes from virtualmin-powerdns module! when I uncheck virtualmin-powerdns feature prior to creating the virtual server, the error doesn't happen :)

Ok ... are you intentionally using the PowerDNS plugin, or did you just have it enabled by mistake?

Mostafa's picture
Submitted by Mostafa on Sat, 12/24/2016 - 01:04

It was intentionally however I've now removed it and switched to bind because of this issue.

Are you sure that use of PowerDNS was the trigger? Because based on the original post, the error happened when setting up a mysql database for the domain..

Mostafa's picture
Submitted by Mostafa on Sun, 12/25/2016 - 04:46

Yes Jamie, you may not remember this correctly since you developed the plugin about 10 years ago! The plugin uses mysql database and it appears that the functions in that plugin cause that issue. I have tested it several times and I'm sure that the issue comes from Virtualmin powerdns plugin.

Any chance I could login to your system to see what's going wrong here? I'm unable to re-produce this, and it's really odd that an error in one plugin could effect a different feature..

Mostafa's picture
Submitted by Mostafa on Tue, 12/27/2016 - 01:51

Sure! Please confirm your public key

Here it is :

ssh-dss AAAAB3NzaC1kc3MAAACBALPtrQgus8wMeTrxiQREVKNGK1b8S9MLcsVngXsaNL2IpzHzajjDxEhkxARlpREFdvhPB9XEMa8IYVRmScyYaAMoespibzq1A24kcBQ3iLDrgoTb/UiRxv7c84WhQud1YpbteKpcpfG582wste+3FqkzvQ6pbNcI0Kkuruhb0s+HAAAAFQDDRVRFXdmNFNR+N3D/XwkIAb7hhQAAAIB0GN+AIuA9OonKbJpgoKz3TKhWNf6DAm39y8Zb//zMaK8/Lc1FMpOsNI/R4Y6LPvCJeAyDXuf/5OT3+613xu70bSSUi2g4UXA6RM/PlSUhdEH4XmG8SoB9abaIObU2AkH84Dkf25qVlSRAL/5aU/R7InXk7jJYFD+cz7vau/4jKAAAAIA1keU19UdRAzUKpbHFotBso8UnQzurcoFWNq8YtjkV9x32sjHuatab+mSXvjjSV9VDZ1Ru+6h5q/Vf6tr4yUuAYIo9s9LGA/MQgOVl7k+Dsn6N9UCta8/yoDXPMBbYQoiUJ2sOQ0pCaPeYXH6WTbB9edgxRow8WFQjGW26t6cF5Q== dsa-key-20031024
Mostafa's picture
Submitted by Mostafa on Wed, 12/28/2016 - 01:12

This has now been added, you can now login as root to gigfa.webs.nf !

Ok, give it a try now - it looks like something odd is happening on your system when two different parts of the Virtualmin code are connecting to MySQL as two different users. I enabled a work-around that should solve it though.