[lug] mysql table creation scripts

D. Stimits stimits at idcomm.com
Sun Jun 10 22:27:03 MDT 2001


This seems like it should be easier, but I am trying to take a mysql
dump from one install, and load it into another (boot on one drive,
dump, reboot and change hard drive slots in between so the new one
boots...then mount old one for access to dump files).

The dump results in sql files for creation of tables, as well as txt
files for the actual data. When I did a LOAD FROM INFILE for the mysql
users, it added the users, but failed to actually force them to use the
passwords they were assigned (possibly, loading one table at a time,
this won't work?). Despite the user table being an exact duplicate (as
far as I can see), and that table being set with passwords, initial use
of that user works only *without* a pass. Use of a pass causes failure.
I must manually use mysqladmin to actually create passwords, it is
ignoring the user table it seems.

There are also dumps of table structures in several databases of the
mysql system, which I'd like to use to recreate, but I also do not want
to use mouse copy and paste if not needed. I can use the LOAD command
for actual data, but does anyone here know if I can directly source a
file for SQL commands (the table creation scripts)?

Does anyone have an idea of a better way to use a mysqldump to make a
duplicate of that dump on another machine with a freshly installed
system? Updating passwords one at a time, mouse pasting table creation,
so on, seems rather inefficient. And although LOAD of data from the
dumped .txt files isn't entirely bad, it seems that there should be a
mechanism in place that is the reverse of a dump, and it looks like
maybe mysqlimport would still require manually listing files one at a
time in nearly the same way as I have been doing it. What advice is
there on use of a dump for duplication?

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list