Learning Mysql



Download 4.24 Mb.
View original pdf
Page70/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   66   67   68   69   70   71   72   73   ...   366
Learning MySQL
--user=root \
--password=the_mysql_root_password \
--result-file=dump_of_all_databases_from_old_server.sql \
--all-databases
72 | Chapter 2:
Installing MySQL

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 shutdown
4. 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_password
You 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.sql
Of 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 \

Download 4.24 Mb.

Share with your friends:
1   ...   66   67   68   69   70   71   72   73   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page