Submitted by rsecor on Mon, 10/26/2015 - 15:35
Failed to create virtual server : SQL select password from user where user = 'int' failed : Unknown column 'password' in 'field list'
MySQL 5.7 does not contain a "password" field in "mysql.users" to "authentication_string".
Likely this will have to be a configuration variable somewhere so that pre-MySQL 5.7 still uses "password" but MySQL 5.7+ uses "authentication_string".
With any luck this is the last of the changes. On a side note: IMO the MySQL dev really should not have made a change like this until a major release like 6.x.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Mon, 10/26/2015 - 19:50 Comment #1
Wow ... that changes everything.
Does Ubuntu 14.04's MySQL package use version 5.7, or did you install this from another source?
Submitted by andreychek on Mon, 10/26/2015 - 19:55 Comment #2
No, that would have come from another source.
Ubuntu 14.04 provides MySQL 5.5.x.
Submitted by Ismet Togay on Tue, 10/27/2015 - 01:24 Comment #3
"In MySQL 5.7, the password field in mysql.user table field was removed, now the field name is 'authentication_string'."
http://stackoverflow.com/questions/30692812/mysql-user-db-does-not-have-...
Submitted by rsecor on Tue, 10/27/2015 - 07:48 Comment #4
I installed it from MySQL's apt repository. They have their own, just like PostgreSQL does.
Submitted by rsecor on Tue, 10/27/2015 - 07:49 Comment #5
I was thinking that ./webmin/mysql/config could have an option added, such as:
password_field=password
For 5.7+password_field=authentication_string
Thoughts?
Submitted by JamieCameron on Wed, 10/28/2015 - 00:59 Comment #6
I think I will need to add code to detect the MySQL version and use the new
password
field.It would be good to check the entire list of changes on mysql. You can't change passwords and stuff as easily as before. They have a new set password syntax that has to be used.
It seems DBD::mysql does have an option to check the server version to alter how you change passwords etc.
Submitted by JamieCameron on Sun, 11/01/2015 - 17:31 Comment #8
Are any Linux distributions including MySQL 5.7 by default? It seems like when that happens, a lot of existing installs are going to be broken or need a fairly complex upgrade to rename the password column.
None that I had seen BUT the speed differences are WELL worth the upgrade. It was no piece of cake but again well worth the effort.
Submitted by andreychek on Sun, 11/01/2015 - 17:47 Comment #10
No, not yet.
The most recent Linux distribution supported by Virtualmin is Debian 8, and that comes with MySQL 5.5.46.
The next distribution to make a release that Virtualmin will support is Ubuntu 16.04 (which comes out in April 2016). It's still early on in that release cycle, but so far they're testing MySQL 5.6.25 with it.
Submitted by rsecor on Mon, 11/02/2015 - 10:00 Comment #11
Just for reference... (as a test)...
We went ahead and manually changed all references to the "password" column to "authentication_string" on one of our servers and it seemed to work fine. We have not ran into any other issues, at least not since I changed it 3 days ago).
That may work but it seems from the documentation that they want you to use the
I tinkered with using the field name with update statements and password('xxx') but it seemed a bit flakey to me. YMMV.
Submitted by jmprince80 on Tue, 11/10/2015 - 17:55 Comment #13
A quick and dirty fix for anyone who needs it:
In /usr/share/webmin/virtual-server/feature-mysql.pl
Search for "# Query local MySQL server"
Line 1530:
needs to be changed to
Submitted by richardevs on Sat, 12/05/2015 - 11:46 Comment #14
Thanks to the fix that upstairs provided but there are just more...
Such as here:
Creating MySQL login .. .. MySQL database failed! : SQL insert into user (host, user, password, ssl_type, ssl_cipher, x509_issuer, x509_subject) values ('localhost', '', password(''), '', '', '', '') failed : Unknown column 'password' in 'field list' at ../web-lib-funcs.pl line 1397.
Submitted by JamieCameron on Sat, 12/05/2015 - 20:22 Comment #15
This will take a fair bit of work to fix, but hopefully it will be done by the next Webmin release - I will update this ticket with details.
Submitted by jmprince80 on Sun, 12/06/2015 - 21:50 Comment #16
@richardevs, I noticed this after posting; and modded the appropriate files and now have no issues. It also helps to have mysql not running in strict mode. If anyone needs modified source get at me on jp(at]txt3 dotnet.
Submitted by jmprince80 on Sun, 12/06/2015 - 21:52 Comment #17
Re changing virtualmin code would it not be enough to check for whether password or authentication_string exist and substitute in the sql queries? Small performance hit...
Submitted by JamieCameron on Sun, 12/06/2015 - 21:57 Comment #18
Right, it's not technically a huge challenge - there's just quite a few places in the Webmin and Virtualmin code to update.
I don't do perl and I mentioned earlier about the library exposing the version of MySQL, can't you to a ternary expression in the code like
select ... from ... where (mysql_version < 5.7 ? 'password' : 'authentication_string') ...
Seems like it might be an easy fix but as you say, if it appears in a lot of places, it'll take a while.
I hit the same related error in a couple other places too like when clicking on a user under a domain. I can't edit the user.
Submitted by jmprince80 on Tue, 12/08/2015 - 22:26 Comment #20
The only places I could find reference to this was in /usr/share/webmin/virtual-server/feature-mysql.pl
I have put up the steps I needed to get things working up on my blog, including my modded and working feature-mysql.pl code.
Note that I have not included a check for mysql version in the perl code, so only use this if you have probs with the 5.7 version of mysql.
Link: http://kaffeine.cf/2015/12/09/webminvirtualmin-vs-mysql-server-community...
Submitted by JamieCameron on Tue, 12/29/2015 - 18:39 Comment #21
FYI, Webmin 1.780 and Virtualmin 5.0 will support the new user table format as seen in MySQL 5.7.
Submitted by apurva277577 on Thu, 12/31/2015 - 09:31 Pro Licensee Comment #22
Hello
When will be version of webmin and virtualmin release in which mysql 5.7 will resolved ?
Submitted by JamieCameron on Thu, 12/31/2015 - 17:37 Comment #23
Webmin 1.780 has just been released, and includes MySQL 5.7 support. Virtualmin 5.0 will be out soon, and will also include 5.7 support.
Submitted by gyorgy.chityil@... on Mon, 01/04/2016 - 14:43 Comment #24
I am just trying to restore a backup due to a migration (new server has mysql 5.7 older one has 5.6), and getting this error with the latest Webmin / Virtualmin. Do we need to do anything, or tick any settings to get this to work?
PS: Just noticed the mention that Virtualmin 5.0 is out soon that will have this support. Sorry.
Submitted by gyorgy.chityil@... on Wed, 01/06/2016 - 08:18 Comment #25
Hey Jamie,
Just installed Virtualmin 5 and tried restoring a backup from a server with mysql 5.6 to a server with mysql 5.7, but still getting this error. Will raise a new bug in the Virtualmin queue.
PS here we go http://virtualmin.com/node/39205
Submitted by JamieCameron on Wed, 01/06/2016 - 15:27 Comment #26
Damn, looks like there is a MySQL 5.7-specific use case that we don't handle yet. Looking into it now..
Submitted by JamieCameron on Fri, 01/08/2016 - 18:48 Comment #27
Submitted by JamieCameron on Fri, 01/08/2016 - 18:48 Comment #28
Ok, the next Virtualmin release will fix these bugs.
Submitted by rogeriobrito on Thu, 04/14/2016 - 07:52 Comment #30
Hello,
I've just tried to restore a backup on a server with MySQL 5.7 and got the same error:
Restoring allowed MySQL hosts .. Restore failed : SQL insert into user (host, user, password, ssl_type, ssl_cipher, x509_issuer, x509_subject) values ('%', '*****', password('*******'), '', '', '', '') failed : Unknown column 'password' in 'field list'
Systems is: CentOS Linux 7.2.1511 Webmin 1.791 Authentic Theme 17.72 MySQL version 5.7.12
I badly need to restore this backup, please help.
Thanks - Rogerio
Submitted by stephanw on Mon, 05/16/2016 - 03:21 Comment #31
Hi i don't know if this is related to this post. But my Backup from Ubuntu 12.04 (mysqld 5.5.49-0ubuntu0.12.04.1-log, WebMin 1.791) not work on a fresh install with Ubuntu 16.04 (mysqld 5.7.12-0ubuntu1, Webmin 1.795). It seems that the connection to the mysql server not works on my Wordpress WEB Sites.
I am happy if the backup from 12.04 to 16.04 works soon...
Thanks for your works and best regards Steve
Submitted by andreychek on Mon, 05/16/2016 - 08:26 Comment #32
stephanw, can you share some more details about the problem you're seeing there? Are you receiving any errors in the logs when that occurs? For example, some errors may be appearing in $HOME/logs/error_log.
Submitted by faina09 on Thu, 06/23/2016 - 06:50 Comment #33
Still error: "Failed to create virtual server : SQL select password from user where user = ...
Ubuntu Linux 14.04.3
MySQL Server version: 5.7.13
Webmin version 1.780
Virtualmin version 4.18
Submitted by andreychek on Thu, 06/23/2016 - 08:58 Comment #34
faina09 , those Webmin and Virtualmin versions are older. You may want to update to the most recent versions and see if that resolves the problem you're experiencing.
Submitted by faina09 on Thu, 06/23/2016 - 11:24 Comment #35
thank you. I added to my file /etc/apt/sources.list the repos
deb http://software.virtualmin.com/gpl/ubuntu virtualmin-trusty main
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
and updated webmin to 1.810, but virtualmin do not upgrade, neither fro apt.get neither form webmin interface... any hint?
Submitted by andreychek on Thu, 06/23/2016 - 11:43 Comment #36
You'd want to make sure you're using a supported Linux distribution/version:
https://www.virtualmin.com/os-support.html
If the distribution you're using is supported, then you'd need to review the lines in your sources.list file to ensure they're pointing at the Virtualmin repository.
If you continue to have problems updating Virtualmin, since it appears you're using Virtualmin GPL, what we'd suggest is for you to open up a new Forum thread, and there, let us know what distro/version you're using, as well as the contents of your /etc/apt/sources.list file. Thanks!
Submitted by faina09 on Thu, 06/23/2016 - 12:04 Comment #37
My OS is supported (ubuntu 14.02); I added
deb http://software.virtualmin.com/gpl/ubuntu virtualmin-universal main
and then upgrade process worked fine. Thank you! BTW, also the problem with MySQL 5.7 is resoved with Virtualmin 5.03 gpl