Re: upgrading mysql client and server

2006-09-02 Thread Matthew Seaman
Dave wrote:

I've got mysql server and client v4.1 running on a FreeBSD6.x box.
 They were installed via ports not packages using custom make options
 which i have in portupgrade's pkgtools.conf file. I now would like to
 upgrade both of them to v5, without causing dependency issues with
 installed apps or with my databases. What i was wondering is is there an
 easy way of doing this? I am concerned about my databases, i've done
 mysqldumps on them, but i have to manually go in and create information.
 I'd rather feed the mysql command a complete file and have it
 automatically regenerate everything. I'm also concerned about any
 compatibility issues. Any help appreciated.

This isn't an amazingly difficult upgrade.  However there are a few
gotchas you should be aware of.

*) MySQL 5.0.x is pretty much backwards compatible with 4.1.x -- ie.
   everything that's in 4.1.x is also in 5.0.x (but the converse is
   not true).  On disk data formats may be slightly changed, but you
   should be able to run the mysql_upgrade script to convert everything
   to 5.0.x style.  mysql_upgrade comes as part of the mysql-client-5.0.x
   port/package

   You should certainly take good backups of your 4.1.x databases,
   but if everything goes according to plan, you won't actually need
   to load them into the upgraded MySQL server.

*) Upgrade the MySQL client port and its dependencies first.  MySQL
   client 5.0 will interoperate pretty well with MySQL server 4.1 but
   not necessarily vice versa.  You will also need to recompile
   anything that links against the MySQL shlibs, as the ABI has
   changed between the versions.  Using portupgrade makes that fairly
   simple, and portupgrade's feature of preserving any shlibs removed
   from old ports in /usr/local/lib/compat/pkg means the old 4.1
   dependent stuff will still continue to work even after you've updated --
   again, not that you should be planning to use mysql dependent
   programs while upgrading, but having that capability is useful if
   you run into problems.

*) Make sure to shut down the mysql daemon before attempting to upgrade
   it.  I know this is bleeding obvious, but it's also easy to forget.
   Not doing this can lead to data corruption, and in fact the port will
   automatically kill any running mysql at re-install time. But do be sure
   to double check.

The sequence of thing you'll need to do is as follows:

0) You've got good backups, haven't you?

i) Examine the output of 'pkg_info -R mysql-client-\*' and note down
   any daemon processes that depend on MySQL.  You should shut those down
   for the duration of the upgrade process.  Alternatively you could
   drop to single user mode to carry out this whole procedure.

   ii) Edit /etc/make.conf and insert in it:

 WITH_MYSQL_VER= 50

   You can put extra compile time flags for the mysql port into
   /etc/make.conf at the same time.  eg. I tend to use something
   like this, which you should modify to suit your own needs:

 .if ${.CURDIR:M*/databases/mysql*}
 WITH_CHARSET=latin1
 WITH_XCHARSET=none
 WITH_COLLATION=latin1_swedish_ci
 WITH_OPENSSL=yes
 BUILD_OPTIMIZED=yes
 WITH_INNODB=yes
 WITH_ARCHIVE=yes
 WITH_FEDERATED=yes
 WITH_NDB=yes
 .endif 

   Or you can use the MAKE_ARGS array in pkgtools.conf to achieve a similar
   effect.  (Note that pkgtools.conf only applies to portupgrade et al,
   /etc/make.conf applies generally to any way of using the ports)

  iii) Make sure the database is shut down:

 /usr/local/etc/rc.d/mysql-server stop

   iv) Upgrade mysql-client, replacing mysql-client-4.1.x in the dependencies
   between your installed ports:

portupgrade -o databases/mysql50-client -f mysql-client-\*

   iv) Upgrade mysql-server, replacing mysql-server-4.1.x in the dependencies
   between your installed ports:

portupgrade -o databases/mysql50-server -f mysql-server-\*

v) Force a recompile of everything else that depends on mysql-client so
   that they all link against the upgraded shlib:

portupgrade -Nfi -r mysql-client-\* -x mysql-client -x mysql-server

   Certain MySQL related ports are specific to one mysql version, such
   as eg. p5-DBD-mysql50-3.0006 or mysql-scripts-5.0.24 and you may have
   to use the 'portupgrade -o port/name -f pkg' style of command to get
   them upgraded properly.

   vi) Restart mysql-server.  Immediately run the mysql-upgrade program:

mysql_upgrade -v -b /usr/local -d /var/db/mysql -u root

   (Will prompt you for the [EMAIL PROTECTED] password to the DB)
   That should fix up anything that needs fixing, especially the user
   grant tables.

   Examine /var/db/mysql/$HOSTNAME.err to see if there are any obvious
   

Re: upgrading mysql-server

2006-06-11 Thread Michael P. Soulier
On 10/06/06 Gerard Seibert said:

  I'm not aware of any port doing this. If you use portupgrade, use the
  AFTERINSTALL configuration options to call the rc.d scripts and restart.
 
 You can configure 'portmanager' to stop and restart a program also. I
 was having the same problem with MySQL. After configuring 'portmanager'
 to properly handle MySQL, I never had another problem with it.

I'll take a look at these options, thanks. 

Mike

-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


pgpCJX6YTTQbM.pgp
Description: PGP signature


Re: upgrading mysql-server

2006-06-10 Thread Riemer Palstra
On Fri, Jun 09, 2006 at 09:01:00PM -0400, Michael P. Soulier wrote:
 If the port is mysql41-server, maybe the package name should be similar?

Ah, because the package is named mysql-server-4.1.20.tbz you mean? Hm,
for people using packages, this would maybe make life easier, but to be
honest, I don't know if it's possible to name the package differently
from PORTNAME(+PKGSUFFIX)+PORTVERSION...

-- 
Riemer PalstraAmsterdam, The Netherlands
[EMAIL PROTECTED]http://www.palstra.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql-server

2006-06-10 Thread Riemer Palstra
On Fri, Jun 09, 2006 at 09:08:03PM -0400, Michael P. Soulier wrote:
 And it shuts down my mysql server, but does not start it again. That's
 not very nice. Should the upgrade not handle this?

I'm not aware of any port doing this. If you use portupgrade, use the
AFTERINSTALL configuration options to call the rc.d scripts and restart.

-- 
Riemer PalstraAmsterdam, The Netherlands
[EMAIL PROTECTED]http://www.palstra.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql-server

2006-06-10 Thread Gerard Seibert
Riemer Palstra wrote:

 On Fri, Jun 09, 2006 at 09:08:03PM -0400, Michael P. Soulier wrote:
  And it shuts down my mysql server, but does not start it again. That's
  not very nice. Should the upgrade not handle this?
 
 I'm not aware of any port doing this. If you use portupgrade, use the
 AFTERINSTALL configuration options to call the rc.d scripts and restart.

You can configure 'portmanager' to stop and restart a program also. I
was having the same problem with MySQL. After configuring 'portmanager'
to properly handle MySQL, I never had another problem with it.

Just my 2ยข.


-- 
Gerard Seibert
[EMAIL PROTECTED]


Scitum est inter caecos luscum regnare posse. (It is well known, that
among the blind the one-eyed man is king.)

 Gerard Didier Erasmus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql-server

2006-06-10 Thread Nikolas Britton

On 6/8/06, Michael P. Soulier [EMAIL PROTECTED] wrote:

So, my nightly security report says that I should upgrade mysql-server.

[EMAIL PROTECTED] ~]# pkg_info | grep mysql-server
mysql-server-4.1.15 Multithreaded SQL database (server)

But, what port does this correspond to?



Simply cd into /usr/ports/databases/postgresql81-server and type make
install clean... This should fix you problems. :-)

--
BSD Podcasts @:
http://bsdtalk.blogspot.com/
http://freebsdforall.blogspot.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql-server

2006-06-09 Thread Riemer Palstra
On Thu, Jun 08, 2006 at 06:40:01PM -0400, Michael P. Soulier wrote:
 [EMAIL PROTECTED] ~]# ls -d /usr/ports/databases/mysql*server
 /usr/ports/databases/mysql323-server/   /usr/ports/databases/mysql50-server/
 /usr/ports/databases/mysql40-server//usr/ports/databases/mysql51-server/
 /usr/ports/databases/mysql41-server/
 
 I'm assuming mysql41-server, since it's version 4.1.15. 

Your assumption is right.

-- 
Riemer PalstraAmsterdam, The Netherlands
[EMAIL PROTECTED]http://www.palstra.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql-server

2006-06-09 Thread Michael P. Soulier
On 09/06/06 Riemer Palstra said:

  I'm assuming mysql41-server, since it's version 4.1.15. 
 
 Your assumption is right.

Ok. Upgrading now. 

If the port is mysql41-server, maybe the package name should be similar?

Thanks,
Mike

-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


pgpQQl3SOAcD4.pgp
Description: PGP signature


Re: upgrading mysql-server

2006-06-09 Thread Michael P. Soulier
On 09/06/06 Michael P. Soulier said:

 Ok. Upgrading now. 

And it shuts down my mysql server, but does not start it again. That's not
very nice. Should the upgrade not handle this?

Mike

-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


pgpSnqmYxEix0.pgp
Description: PGP signature


Re: Upgrading mysql 4.0 to 4.1

2005-09-22 Thread Erik Norgaard

Roger Merritt wrote:
I want to upgrade mysql from ver. 4.0.26 to 4.1.x but am daunted by the 
existence of the separate ports. Can I just run portinstall -R 
mysql41-\* or should I do pkgdeinstall mysql40-\* first?


mysql client 4.1 cannot connect to server 4.0 (and AFAIK, nor can client 
4.0 connect to server 4.1) which justifies the existence of separate ports.


They conflict so you will have to deinstall 4.0 first then install 4.1. 
Just to be on the safe side, take a complete dump of your database 
first. server 4.1 should be able to read the old database with out 
having to reaload everything.


Cheers, Erik

--
Ph: +34.666334818  web: www.locolomo.org
S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt
Subject ID:  9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72
Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading mysql 4.0 to 4.1

2005-09-22 Thread martin hudec
Hello,

On Thu, Sep 22, 2005 at 09:40:32AM +0200 or thereabouts, Erik Norgaard wrote:
 mysql client 4.1 cannot connect to server 4.0 (and AFAIK, nor can client 4.0 
 connect to server 4.1) which justifies the existence of 
 separate ports.

  Actually mysql 4.1 client is able to connect to mysql 4.0 server. I
  migrated our production servers to 4.1, with some databases still left
  in few 4.0, and applications are able to communicate with both
  versions via mysql 4.1 client.

  [amber] ~ mysql --version
  mysql  Ver 14.7 Distrib 4.1.13, for portbld-freebsd5.4 (i386) using
  4.3
  [amber] ~ 
  [amber] ~ 
  [amber] ~ 
  [amber] ~ mysql -u corwin -p -h 192.168.0.13 
  Enter password: 
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 44001 to server version: 4.0.25

  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

  mysql 
  
-- 
martin hudec


   * 421 907 303 393
   * [EMAIL PROTECTED]
   * http://www.aeternal.net

Nothing travels faster than the speed of light with the possible 
exception of bad news, which obeys its own special laws.

   Douglas Adams, The Hitchhiker's Guide to the Galaxy


pgp4Fc1GOFViZ.pgp
Description: PGP signature


Re: Upgrading mysql 4.0 to 4.1

2005-09-22 Thread Gerard Seibert
On Thu, 22 Sep 2005 10:05:31 +0700, Roger Merritt [EMAIL PROTECTED]
Subject: Upgrading mysql 4.0 to 4.1
Wrote these words of wisdom:

 I want to upgrade mysql from ver. 4.0.26 to 4.1.x but am daunted by the 
 existence of the separate ports. Can I just run portinstall -R mysql41-\* 
 or should I do pkgdeinstall mysql40-\* first?
 
 -- 
 Roger


* REPLY SEPARATOR *
On 9/22/2005 4:53:54 AM, Gerard Seibert Replied:

I went that root until I finally updated to MySQL 5. In any case, you
could try the following. From root:

1) Update your ports
2) Install 'portmanager'
3} Run portmanager -u

That will update all of your out of date ports and their dependencies as
well as updating MySQL. Be fore warned, you will have to restart MySQL
after portmanager has finished running. Actually, if there are a lot of
running processes updated, I just reboot.


-- 
Gerard Seibert
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading MySQL Without Wrecking Bacula

2005-06-11 Thread Drew Tomlinson

On 6/10/2005 10:25 PM Kevin Kinsey wrote:


Drew Tomlinson wrote:

I am a total noob regarding MySQL.  I have version 3.23 installed on 
my 4.10 system.  The only thing it's been used for and by is Bacula.  
I have never used it directly.


But now I have reason to learn MySQL and feel it would be appropriate 
to start with a newer version.  I see there's 4.1 and 5.0.  Even 
though it's beta, I'm inclined to just start with 5.0 since my data 
will not be super critical and quite small.  Basically I want t make 
a product database and display it via web pages.  There are less than 
10,000 products.  I also don't see more than 2 or 3 clients accessing 
it at one time.  Maybe in an extreme case there might be 10 clients.  
Overall, pretty small.


So what must I do to upgrade from 3.23 to something newer and keep 
Bacula happy.  I've read the Bacula web site and it claims to work 
with 3.23 and higher.  I've browsed the MySQL site and see 
instructions to upgrade from 3.23 to 4.0, 4.0 to 4.1, and upgrading 
to 5.0.  However I'm sure I don't really need to upgrade in steps?


Any guidance, advice, and/or links to tutorials would be greatly 
appreciated.


Thanks,

Drew



I like mysqldump for easy to recreate backups:

$ mysqldump sometable  sometable.sql

To restore, you need to add a statement to the top
of the file, like use sometable.  Then:

$ mysqladmin create cometable

and, finally:

$mysql  sometable.sql

And everything should be good to go.


Thanks for the tip.  It gives me somewhere to start.


Sorry I'm not much more help.  I use portupgrade and/or portmanager
to keep things somewhat up to date, but I don't know if there would
be any gotchas with that and Bacula or not.  I'd tend to think that as
long as I had all my databases backed up, I could uninstall 323 and
install something from the 4X or 5X line and not have too many issues.


Me too.  portupgrade is a great tool.  I agree that if I have the 
databases backed up, I should be able to restore.  This is just my home 
system so if the worst happened and I lost my complete bacula database, 
it still wouldn't be the end of the world (unless my hard drive crashed 
before I got bacula running again).



You might want to learn a little about using the MySQL monitor itself,
first, in 3.23; a little knowledge of MySQL syntax would add to your
confidence in restoring the data, I would think . . .


I've fiddled around with MySQL a little so far.  Webmin provides an easy 
interface to administering MySQL users, databases, etc. and that has 
been very helpful.  Now I just have to learn what real commands Webmin 
calls when performing these functions.  I suspect it uses mysqladmin.


Thanks for your reply,

Drew

--
Visit The Alchemist's Warehouse
Magic Tricks, DVDs, Videos, Books,  More!

http://www.alchemistswarehouse.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading MySQL Without Wrecking Bacula

2005-06-10 Thread Kevin Kinsey

Drew Tomlinson wrote:

I am a total noob regarding MySQL.  I have version 3.23 installed on 
my 4.10 system.  The only thing it's been used for and by is Bacula.  
I have never used it directly.


But now I have reason to learn MySQL and feel it would be appropriate 
to start with a newer version.  I see there's 4.1 and 5.0.  Even 
though it's beta, I'm inclined to just start with 5.0 since my data 
will not be super critical and quite small.  Basically I want t make a 
product database and display it via web pages.  There are less than 
10,000 products.  I also don't see more than 2 or 3 clients accessing 
it at one time.  Maybe in an extreme case there might be 10 clients.  
Overall, pretty small.


So what must I do to upgrade from 3.23 to something newer and keep 
Bacula happy.  I've read the Bacula web site and it claims to work 
with 3.23 and higher.  I've browsed the MySQL site and see 
instructions to upgrade from 3.23 to 4.0, 4.0 to 4.1, and upgrading to 
5.0.  However I'm sure I don't really need to upgrade in steps?


Any guidance, advice, and/or links to tutorials would be greatly 
appreciated.


Thanks,

Drew



I like mysqldump for easy to recreate backups:

$ mysqldump sometable  sometable.sql

To restore, you need to add a statement to the top
of the file, like use sometable.  Then:

$ mysqladmin create cometable

and, finally:

$mysql  sometable.sql

And everything should be good to go.

Sorry I'm not much more help.  I use portupgrade and/or portmanager
to keep things somewhat up to date, but I don't know if there would
be any gotchas with that and Bacula or not.  I'd tend to think that as
long as I had all my databases backed up, I could uninstall 323 and
install something from the 4X or 5X line and not have too many issues.

You might want to learn a little about using the MySQL monitor itself,
first, in 3.23; a little knowledge of MySQL syntax would add to your
confidence in restoring the data, I would think . . .

HTH,

Kevin Kinsey
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading MySQL strategies

2004-06-24 Thread David Fuchs
Doug Poland wrote:
Does someone have a strategy for upgrading MySQL?

I've searched the archives and have turned up nothing useful.  One would 
think this would be covered in MySQL's excellent on-line docs, but I 
could find no mention of upgrading.

Hi Doug,
As a rule, you shouldn't trust that your database will be compatible 
with any version of MySQL besides the one it currently runs under. 
Dumping the database and re-loading it is the best option.  Make sure to 
check the changelog for the new version beforehand, just in case there 
have been important changes (possible inclusion of new reserved words - 
things of that nature).  Sometimes there are specific processes you need 
to follow for upgrading certain versions of MySQL (i.e. you'll need to 
run a contributed script or something) - where applicable, these 
processes are well-documented.

I think a good 'strategy' is the same one you would use for any kind of 
upgrade - one that allows you to test your changes safely and thoroughly 
before implementing them.  Always backup first, of course.  Run both the 
old and new versions of MySQL side-by-side with separate copies of the 
database (you'll need to modify your config appropriately to run two 
copies) and take your time with it to ensure things are running as expected.

Section 2.5 of the MySQL documentation has a lot of good information for 
upgrading.  You can view the HTML copy (with user comments) here:

http://dev.mysql.com/doc/mysql/en/Upgrade.html
--
Thanks,
-David Fuchs BCIS ([EMAIL PROTECTED])
 WWW:  http://www.davidfuchs.ca/
Blog:  http://blog.davidfuchs.ca/
 MSN:  [EMAIL PROTECTED]
 PGP:  http://www.davidfuchs.ca/aboutme/433EEC91.pgp
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading MySQL strategies

2004-06-24 Thread Doug Poland

David Fuchs said:
 Doug Poland wrote:
 Does someone have a strategy for upgrading MySQL?
  
 I've searched the archives and have turned up nothing useful.  One would
 think this would be covered in MySQL's excellent on-line docs, but I
 could find no mention of upgrading.


 Hi Doug,

 As a rule, you shouldn't trust that your database will be compatible
 with any version of MySQL besides the one it currently runs under.
 Dumping the database and re-loading it is the best option.  Make sure to
 check the changelog for the new version beforehand, just in case there
 have been important changes (possible inclusion of new reserved words -
 things of that nature).  Sometimes there are specific processes you need
 to follow for upgrading certain versions of MySQL (i.e. you'll need to
 run a contributed script or something) - where applicable, these
 processes are well-documented.

 I think a good 'strategy' is the same one you would use for any kind of
 upgrade - one that allows you to test your changes safely and thoroughly
 before implementing them.  Always backup first, of course.  Run both the
 old and new versions of MySQL side-by-side with separate copies of the
 database (you'll need to modify your config appropriately to run two
 copies) and take your time with it to ensure things are running as expected.

 Section 2.5 of the MySQL documentation has a lot of good information for
 upgrading.  You can view the HTML copy (with user comments) here:

 http://dev.mysql.com/doc/mysql/en/Upgrade.html

Thanks for the info.  Don't know how I could have missed that URL on MySQL's site.

-- 
Regards,
Doug
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Question about something in ports/CHANGES file (re: upgrading MySQL)

2004-03-23 Thread Paul D. Schmidt
Where can I find more information about the following? (Taken
from /usr/ports/CHANGES)
20040204:
   ...
   The ports system now supports MySQL 3.23, 4.0, 4.1, and 5.0.
   Also, the ability to scale to newer versions was also but in
   place.
   ...
I don't see anything in the mysql40-server Makefile that has anything
to do with upgrades...where else should I look?  I'm trying to convert
from a 3.23 system.
Thanks,
-Paul
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Question about something in ports/CHANGES file (re: upgrading MySQL)

2004-03-23 Thread Matthew Seaman
On Tue, Mar 23, 2004 at 01:10:38PM -0800, Paul D. Schmidt wrote:
 Where can I find more information about the following? (Taken
 from /usr/ports/CHANGES)
 
 20040204:
...
The ports system now supports MySQL 3.23, 4.0, 4.1, and 5.0.
Also, the ability to scale to newer versions was also but in
place.
...
 
 I don't see anything in the mysql40-server Makefile that has anything
 to do with upgrades...where else should I look?  I'm trying to convert
 from a 3.23 system.

That's not too difficult to do:

0) Get a list of all the applications that linl against the
   mysql323-client port:

% pkg_info -R mysql-client\*

i) Backup your database. See mysqldump(1).  You shouldn't need
   this backup copy unless things go horribly wrong.

   ii) Delete the databases/mysql323-{client,server} ports using
   'pkg_delete -f'.  This shouldn't affect anything under /var/db
   (or wherever you've set DB_DIR to).

  iii) Install mysql40-server and mysql40-client ports making sure you
   add 'OVERWRITE_DB=no' to the make arguments.  You should be
   able to start up mysql-4.0.x, log into your databases from the
   command line and check that things are still OK.  mysql40 will
   happily read database files created by mysql323: I think it
   even autodetects that situation and updates the files for you.
   You should check all of the GRANT tables as mysql40 introduced
   some new grantable permissions, and you may need to fiddle
   about with user settings.

   iv) Optionally edit /etc/make.conf and add WANT_MYSQL_VER=40 -- you
   don't have to do this, as the ports system will work out which
   version of mysql you have installed automatically, but it does
   just make sure.

v) Reinstall all of the ports you listed in (0) that linked
   against the mysql323-client port (except, obviously,
   mysql-server-3.23.x), so that they now link against
   mysql40-client.  If you're using portupgrade(1) you may have to
   run through 'pkgdb -Fvu' to placate its worries about missing
   dependencies before it will let you run 'portupgrade -f'.

And that's all there is to it, really.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: upgrading mysql

2004-01-23 Thread Dinesh Nair

On Thu, 22 Jan 2004, Christer Solskogen wrote:
 I was wondering upgrading the mysql ports to 4.x series. should this be
 okay?

 gallery-1.4.1 ,p5-Mysql-modules-1.2219, php4-4.3.4_5, phpMyAdmin-2.5.4,
 phpSysInfo-2.1 and squirrelmail-1.4.2_1 seems to like mysql-3, and i was
 wondering if these ports will work with mysql4.

it should be alright, as iirc, mysql has not changed it's sql syntax from
3.x to 4.x. in fact, 4.x is now the production release.

 and if this works, how will be the correct way of upgrading the mysql
 packages?

you'd have less problems using portupgrade to upgrade your existing mysql
3.x to 4.x. portupgrade will take care of the dependencies to 3.x from
your existing installed applications correctly. once this is done, then
install your latest app which requires 4.x seamlessly thru ports or or
portinstall.

Regards,   /\_/\   All dogs go to heaven.
[EMAIL PROTECTED](0 0)http://www.alphaque.com/
+==oOO--(_)--OOo==+
| for a in past present future; do|
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo The opinions here in no way reflect the opinions of my $a $b.  |
| done; done  |
+=+

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql

2004-01-22 Thread Andrew L. Gould
On Thursday 22 January 2004 10:51 am, Christer Solskogen wrote:
 It seems like some port i want to install depend on mysql4, but i have
 some programs that depends on mysql-client-3.23.58_1 ( I also have
 mysql-server-3.23.58_1 installed)

 I was wondering upgrading the mysql ports to 4.x series. should this be
 okay?

 gallery-1.4.1 ,p5-Mysql-modules-1.2219, php4-4.3.4_5, phpMyAdmin-2.5.4,
 phpSysInfo-2.1 and squirrelmail-1.4.2_1 seems to like mysql-3, and i was
 wondering if these ports will work with mysql4.

 and if this works, how will be the correct way of upgrading the mysql
 packages?

Below is a link to an article about portupgrade, a port that manages the 
upgrading of ports.  Portupgrade has options to upgrade port dependencies as 
well as other ports that use the port you're upgrading.  If you use the -n 
switch, portupgrade will report the steps required without actually 
performing the upgrade.

http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html

Best of luck,

Andrew Gould

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql

2004-01-22 Thread Christer Solskogen
 On Thursday 22 January 2004 10:51 am, Christer Solskogen wrote:
 It seems like some port i want to install depend on mysql4, but i have
 some programs that depends on mysql-client-3.23.58_1 ( I also have
 mysql-server-3.23.58_1 installed)

 I was wondering upgrading the mysql ports to 4.x series. should this be
 okay?

 gallery-1.4.1 ,p5-Mysql-modules-1.2219, php4-4.3.4_5, phpMyAdmin-2.5.4,
 phpSysInfo-2.1 and squirrelmail-1.4.2_1 seems to like mysql-3, and i was
 wondering if these ports will work with mysql4.

 and if this works, how will be the correct way of upgrading the mysql
 packages?

 Below is a link to an article about portupgrade, a port that manages the
 upgrading of ports.  Portupgrade has options to upgrade port dependencies
 as
 well as other ports that use the port you're upgrading.  If you use the -n
 switch, portupgrade will report the steps required without actually
 performing the upgrade.

 http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html


thanks, but i know this. my mysql-3 ports are up to date. but i want to
migrate to mysql-4, and portupgrade wont do that for me.

-- 
Med vennlig hilsen / Best regards
Christer Solskogen
http://dtz.cjb.net - http://carebears.mine.nu

Cheap, but not as cheap as your girlfriend!
-Spider Jerusalem

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: upgrading mysql

2004-01-22 Thread Matthew Seaman
On Thu, Jan 22, 2004 at 05:51:52PM +0100, Christer Solskogen wrote:
 It seems like some port i want to install depend on mysql4, but i have
 some programs that depends on mysql-client-3.23.58_1 ( I also have
 mysql-server-3.23.58_1 installed)
 
 I was wondering upgrading the mysql ports to 4.x series. should this be okay?
 
 gallery-1.4.1 ,p5-Mysql-modules-1.2219, php4-4.3.4_5, phpMyAdmin-2.5.4,
 phpSysInfo-2.1 and squirrelmail-1.4.2_1 seems to like mysql-3, and i was
 wondering if these ports will work with mysql4.

Apart from gallery-1.4.1 and phpSysInfo-2.1 I have all of those
working just fine with mysql-4.0.17.  PHP will certainly link against
any of the mysql versions available in ports, as will the perl DBI
stuff and the MySQL JDBC interface.  Anything that depends on those
interfaces is therefore pretty much guarranteed to work.
 
 and if this works, how will be the correct way of upgrading the mysql
 packages?

Take a backup of your database contents and any my.cnf files, just in
case.

Deinstall the mysql-3.x ports, using the '-f' (force) option.  This
should not destroy the actual data files used by mysql, just remove
the various binaries and documentation.

Now install which ever mysql-4.x port you require.  Use 'pkgdb -F' to
convice the ports system that all ports which formerly depended on
mysql-3 now depend on mysql-4.  This should be able to read the
mysql-3 datafiles directly, although it may do some internal
modifications, so don't count on being able to downgrade so easily.

Nb. Some of the internal privilege control tables are different in
mysql-4: you should review all of your GRANTS within the mysql
database after doing the upgrade.  Although as the difference is that
there are some new privileges added everything should work pretty
much straight away.

Finally, rebuild all of the ports that depend on mysql-client so that
they link against the correct shared libraries:

# portupgrade -fNr -x databases/mysql40-client databases/mysql40-client

(assuming you want the production version -- mysql-4.0.17)

Most ports that require MySQL connectivity will automatically adjust
to use the version you have installed.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: upgrading mysql

2003-08-29 Thread Jack L. Stone
At 11:56 AM 8.29.2003 -0700, Michelle wrote:
I would like to upgrade mysql from mysql-server-3.23.54 to 
mysql-server-3.23.57 and understand that I will need to do a dump 
before upgrading since the upgrade needs to overwrite the databases.  
Since I have never done this before, I just want to make sure I have 
the correct steps after reading over the mysql site and the man pages.

First I will dump all of my databases:

mysqldump  -A  backup-file.sql

Then I will shutdown the mysql server and upgrade the mysql port with 
the environment variable OVERWRITE_DB defined when running make install.

To rebuild the databases do I simply use:

mysqldump --all-databases  backup-file.sql

and then restart the mysql server using mysqld_safe

Am I missing any steps?

Thank you,
Michelle

I posted this just a few hours ago.

Use portugrade and its easy. It is a simple one-line command on
FBSD-4.x:
# portupgrade -m '-DSKIP_INSTALL_DB' mysql-server-3.23.54




Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


restoring mysql databases from mysqldump was Re: upgrading mysql

2003-08-29 Thread Michelle
I ran mysqldump -A  backup-file.sql and then upgraded the mysql port, 
but now when I try to restore the backups using mysql database name  
 backup-file.sql, It states unknown database.  I also have a 
mysqlhotcopy backup of all my databases.  Am I doing something wrong 
when trying to recover multiple databases?  How can I recover them from 
the mysqlhotcopy rather then the dump if something went wrong with the 
dump?

On Friday, August 29, 2003, at 01:01 PM, Lucas Holt wrote:

That sounds correct.  I would recommend doing a binary backup as well 
in case something happens.  (i usually tar up the mysql directory with 
the service off)

If you want extra security, you could use the phpMyAdmin software to 
backup the databases as well.. so you have an extra copy.  I believe 
it actually runs mysqldump anyway though.

If you can eventually, I'd recommend the 4.x releases.  I have had 
great success with them.

On Friday, August 29, 2003, at 02:56  PM, Michelle wrote:

I would like to upgrade mysql from mysql-server-3.23.54 to 
mysql-server-3.23.57 and understand that I will need to do a dump 
before upgrading since the upgrade needs to overwrite the databases.  
Since I have never done this before, I just want to make sure I have 
the correct steps after reading over the mysql site and the man  pages.

First I will dump all of my databases:

mysqldump  -A  backup-file.sql

Then I will shutdown the mysql server and upgrade the mysql port with 
the environment variable OVERWRITE_DB defined when running make 
install.

To rebuild the databases do I simply use:

mysqldump --all-databases  backup-file.sql

and then restart the mysql server using mysqld_safe

Am I missing any steps?

Thank you,
Michelle
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


Lucas Holt
[EMAIL PROTECTED]

FoolishGames.com  (Jewel Fan Site)
JustJournal.com (Free blogging)
Only two things are infinite, the universe and human stupidity, and 
I'm not sure about the former.
- Albert Einstein (1879-1955)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: restoring mysql databases from mysqldump was Re: upgrading mysql

2003-08-29 Thread Alan Batie
On Fri, Aug 29, 2003 at 02:33:07PM -0700, Michelle wrote:
 I ran mysqldump -A  backup-file.sql and then upgraded the mysql port, 
 but now when I try to restore the backups using mysql database name  
  backup-file.sql, It states unknown database.

I've never had a mysql upgrade trash my databases, but it sounds like
the simple solution is to 'mysqladmin create database name' first.
Though the -A does seem to put create database commands in the dump file.
You might look at the sql and find out what's broken...

I tried dumping all mine, and got a client out of memory error.  Weird.

-- 
Alan Batie   __alan.batie.orgMe
alan at batie.org\/www.qrd.org The Triangle
PGPFP DE 3C 29 17 C0 49 7A\  / www.pgpi.com   The Weird Numbers
27 40 A5 3C 37 4A DA 52 B9 \/  spamassassin.taint.org  NO SPAM!

To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-Theodore Roosevelt, 26th US President (1858-1919)


pgp0.pgp
Description: PGP signature


Re: restoring mysql databases from mysqldump was Re: upgrading mysql

2003-08-29 Thread Michelle
I believe I succesfully restored the databases by running simply mysql 
 backup-file.sql.  However, I believe the permissions are not working 
properly.  Apache is unable to connect the sql server and I cannot 
shutdown the sql server with the user name and password I normally use.

On Friday, August 29, 2003, at 02:33 PM, Michelle wrote:

I ran mysqldump -A  backup-file.sql and then upgraded the mysql port, 
but now when I try to restore the backups using mysql database name  
 backup-file.sql, It states unknown database.  I also have a 
mysqlhotcopy backup of all my databases.  Am I doing something wrong 
when trying to recover multiple databases?  How can I recover them 
from the mysqlhotcopy rather then the dump if something went wrong 
with the dump?

On Friday, August 29, 2003, at 01:01 PM, Lucas Holt wrote:

That sounds correct.  I would recommend doing a binary backup as well 
in case something happens.  (i usually tar up the mysql directory 
with the service off)

If you want extra security, you could use the phpMyAdmin software to 
backup the databases as well.. so you have an extra copy.  I believe 
it actually runs mysqldump anyway though.

If you can eventually, I'd recommend the 4.x releases.  I have had 
great success with them.

On Friday, August 29, 2003, at 02:56  PM, Michelle wrote:

I would like to upgrade mysql from mysql-server-3.23.54 to 
mysql-server-3.23.57 and understand that I will need to do a dump 
before upgrading since the upgrade needs to overwrite the databases. 
 Since I have never done this before, I just want to make sure I 
have the correct steps after reading over the mysql site and the man 
 pages.

First I will dump all of my databases:

mysqldump  -A  backup-file.sql

Then I will shutdown the mysql server and upgrade the mysql port 
with the environment variable OVERWRITE_DB defined when running make 
install.

To rebuild the databases do I simply use:

mysqldump --all-databases  backup-file.sql

and then restart the mysql server using mysqld_safe

Am I missing any steps?

Thank you,
Michelle
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


Lucas Holt
[EMAIL PROTECTED]

FoolishGames.com  (Jewel Fan Site)
JustJournal.com (Free blogging)
Only two things are infinite, the universe and human stupidity, and 
I'm not sure about the former.
- Albert Einstein (1879-1955)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]