NYCPHP Meetup

NYPHP.org

[nycphp-talk] Recycling of ini files

David Krings ramons at gmx.net
Mon Feb 16 10:53:58 EST 2009


Daniel Convissor wrote:
> Hi David:
> 
> On Mon, Feb 16, 2009 at 09:56:27AM -0500, David Krings wrote:
>> Daniel Convissor wrote:
>>> Uh, "have" is the wrong word there. :)  You don't need to drop a 
>>> database before upgrading.  You leave your old tables in place and 
>>> MySQL provides upgrade scripts that implement changes between server 
>>> versions.
>> So you are saying I could drop in the old system tables as well and run 
>> the update application?
> 
> Huh?

Uhm, MySQL stores thing like user accounts and privileges in schemas (what 
some also call databases or just tables or data sets). When you do a brand new 
install of MySQL those system tables contain for example the user account 
"root" with no password and privileges for everything. A better approach is to 
obviously first set a root password, and create new user accounts with 
restricted priveleges for use for example by PHP apps.
 From what I read these system tables changed from the old to the new version. 
Also, changes are necessary for any other tables (the ones created by users). 
What I did is a brand new install (I did backup the old, working installation 
first), dropped my custom tables in and ran mysql-update, which updated my 
tables without problems.

So my question is can I do the same procedure for the system tables as well? 
Will mysql-update make it so that the system tables from my old install will 
work with the new version? I ask because....


> 
> 
>> I read several tutorials and they all stated  
>> explicitly that one should not do that, but only apply that update 
>> mechanism to the own tables.
> 
> Huh?


... some tutorials I read about upgrading explicitly state to not keep the 
system tables, but only drop-in the custom tables and run mysql-update. My 
conclusion from that was that mysql-update will not update system tables or it 
is not recommended to do so. I did  find that to be weird even when I 
installed the new version, because many others most likely deal with more than 
just half a dozen user accounts as it is the case for my install. Since it is 
not much work, but some annoyance to recreate the user accounts and set the 
privileges I didn't bother with digging for more info as I am done doing it 
the manual route by the time I might find something.

Your comments make me believe that this whole "don't upgrade system tables" 
stuff is plain bologna and that there is no difference between custom tables 
and system tables and that they all can be updated using the mysql-update tool.


I hope that this is now less huh. ;)

David



More information about the talk mailing list