Its a good idea to make a backup of this file on CD or copy it across to another computer. Shutdown the old server
bin/mysqladmin -user root --password=the_mysql_root_password shutdown4. Install the new server. Configure and start the new server using the appropriate commands discussed earlier in this chapter. At this point, you should have afresh installation of the MySQL server and associated programs. If the new server version was installed using the same
approach as the old version, it’s likely to have the same data directory. To check that your databases are available on the new server, you can use the mysqlshow command to connect
to it and list the databases bin/mysqlshow -user root --password=the_mysql_root_passwordYou can also use the SHOW DATABASES
command in the MySQL monitor (described in Chapter If
you used a different approach, or for some reason the new server doesn’t know about your old databases, you should now change your working directory to the location
of the new MySQL installation, and then load the databases from the dump file you created earlier
bin/mysql \ -user root \ --password=the_mysql_root_password \< dump_of_all_databases_from_old_server.sqlOf course, you should use the password of the new MySQL server here. Your new server should now have loaded all the databases from your old server.
One of these,
the mysql database, contains
grant tables that specify user access levels. You should now check and upgrade these tables if necessary.
Under Linux, change to your MySQL base directory and type:
$
scripts/mysql_fix_privilege_tables \ --user=root \Share with your friends: