Is this the right export / import command for all databases and users?

Is this the right export / import command for all databases and users?

am 18.08.2010 16:24:08 von Nunzio Daveri

--0-1693422259-1282141448=:84388
Content-Type: text/plain; charset=us-ascii

Hi all, I have upgraded a few test boxes and everything seems to work fine BUT I
wanted to verify with the gurus if my syntax is correct so as to avoid any
future problems ;-)

The purpose is to dump all databases and users / user privileges from our 4.1.20
server and import it into our 5.1.49 server. On the 4.x server I ran:

# mysqldump -A -uroot -p | gzip -4 > ./4.x_mysqldump.sql.gz

Once done and I have MySQL 5.x running on the same box, I type:

# gzip -dc 4.x_mysqldump.sql.gz | mysql -uroot -p

Question: So with these 2 commands I export all the databases and user's and
user's privileges and then import the databases and user's and user's privileges
into 5.x?

Question: Will the above export and import change the 5.x mysql root password
which is different than the 4.x root password?

Question: Will the above export the mysql database (inside mysql 4.x) from 4.x
and re-import it into 5.X (the database that controls users and access and
....)? If so is this okay to do since it's a version upgrade?

Thanks in advance...

Nunzio




--0-1693422259-1282141448=:84388--