Closed (fixed)
Project:
Provision
Version:
5.x-0.2-alpha1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 May 2009 at 04:33 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
acAlso seems /sites/site.example.com is not being removed.
Comment #2
anarcat commentedI confirm the issue with local DBs too. Take a look at this task log:
It just does the backup, but no delete.
Comment #3
anarcat commentedSo I think I fixed this in the latest HEAD. I tested only with localhost this time, please test again with a remote SQL server.
Comment #4
acDatabase is deleted but user is not when using an external db server.
Comment #5
anarcat commentedI confirm that issue on localhost installs.
Comment #6
anarcat commentedSo I have made a patch with basically finished off the patch #337485: allow configuration of the 'host' part of the created mysql users. It seems I forgot quite a few places that were using the host part of the URL.
So I have refactored the "dbclient" guessing in a function and used it everywhere relevant.
I would appreciate if this could be tested before it hits the tree as it is quite invasive.
Comment #7
anarcat commentedTo clarify, the patch takes care of fixing all the incorrect usages of
$db_hostin the code.$db_hostis the name of the SQL server and it should never be confused with what we now call the$db_client, which is the host the server will appear to connect from.$db_clientis usuallyweb_iporweb_hostMaybe that should be part of
provision_drush_init()instead of being duplicated in two functions, but I stick to the agile principle of not refactoring too much, especially since an eventual$db_clientoption would be a duplicate of theweb_ip/web_hostcombo.Comment #8
anarcat commentedActually, even with the patch, the user is not deleted. I must have missed something.
Comment #9
anarcat commentedOh my god. MySQL is so awful. Believe it or not, revoking the GRANT is not enough. You also need to DROP USER:
http://dev.mysql.com/doc/refman/5.0/en/drop-user.html
So I have to add this complicated piece of code to see if the user has a GRANT or not.
I'm going to commit this. It is necessary for the users to be removed properly, regardless of #337485: allow configuration of the 'host' part of the created mysql users. I would like testing, but I'm confident this is solid now.
Comment #10
acConfirmed working on external DB