Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2003 23:48:50 +0800
From:      Khairil Yusof <kaeru@pd.jaring.my>
To:        Michelle <tristan11@mindspring.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: restoring mysql databases from mysqldump was Re: upgrading mysql
Message-ID:  <1062258529.98655.90.camel@daemon.home.net>
In-Reply-To: <613AB8E4-DA68-11D7-BE93-000393843210@mindspring.com>
References:  <613AB8E4-DA68-11D7-BE93-000393843210@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-Tq7bEQogzwD2uQTaJmat
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sat, 2003-08-30 at 05:33, Michelle wrote:

Not really FreeBSD specific..but.. :)

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

mysqldump -A will save all databases, so when restoring you only need:

mysql < backup-file.sql

not:

mysql "database name" < backup-file.sql

This will try to restore only one database (which you need to create
first). This ways is only needed if you do a mysqldump "databasename" >
backup.sql.


--
"Optimized, readable, on time; Pick any two."=20

FreeBSD 5.1-CURRENT i386=20
11:45PM up 1 day, 1:43, 4 users, load averages: 1.33, 1.47, 1.41

--=-Tq7bEQogzwD2uQTaJmat
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQA/UMdhDAqnLW/+/X8RAv7PAKC310uojLzQ7ZHVL3J3EqIfS1snJQCgzln0
b5TIhEtaU6ALvUQ9bFcXk9o=
=flUq
-----END PGP SIGNATURE-----

--=-Tq7bEQogzwD2uQTaJmat--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1062258529.98655.90.camel>