https://nuclear.unh.edu/wiki/index.php?title=Mysql_database_restore&feed=atom&action=historyMysql database restore - Revision history2024-03-29T02:26:06ZRevision history for this page on the wikiMediaWiki 1.35.0https://nuclear.unh.edu/wiki/index.php?title=Mysql_database_restore&diff=3979&oldid=prevMaurik at 11:13, 2 October 20082008-10-02T11:13:49Z<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:13, 2 October 2008</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l21" >Line 21:</td>
<td colspan="2" class="diff-lineno">Line 21:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># UREKA, do a little victory dance!</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># UREKA, do a little victory dance!</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Now edit Wiki with update</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Now edit Wiki with update</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"># Finally, make sure MySQL starts automatically: chkconfig --level 35 mysqld on</ins></div></td></tr>
</table>Maurikhttps://nuclear.unh.edu/wiki/index.php?title=Mysql_database_restore&diff=3976&oldid=prevMaurik at 10:15, 2 October 20082008-10-02T10:15:21Z<p></p>
<p><b>New page</b></p><div>MySQL restore. <br />
<br />
After Roengen was moved to a Virtual system running RHEL5, I did the following to restore MySQL functionality on Roentgen:<br />
<br />
# Install mysql-server on Roentgen.<br />
# Install MySQL 4.1.x mysql-server on Fermi (a 64 bit RHEL4 machine) so we can read the old roentgen files.<br />
# Copy the Mysql database to /net/data/pumpkin1/VM/roentgen_var/mysql<br />
# Load this database into Fermi's Mysql: link db directory (step 2) to /var/lib/mysql on Fermi.<br />
# Startup mysqld on Fermi (execute mysqld_safe)<br />
# Dump database: mysqldump -u root -p --all-databases | gzip -c > /net/data/pumpkin1/VM/roentgen_var/mysql_db.mysql.gz<br />
# Initialize the MySQL on roentgen: mysql_install_db<br />
# Start server: mysql_safe --user=mysql<br />
# Restore old database from dump file: zcat /net/data/pumpkin1/VM/roentgen_var/mysql_db.mysql.gz | mysql<br />
# Shutdown the database: mysqladmin shutdown<br />
# Startup again: mysql_safe --user=mysql<br />
# Check to see if grant tables are now correct:<br />
#* try "mysql" to see if you can get in, no.<br />
#* try "mysql -p" to check super user password.<br />
#* Drop the anonymous and guest users: <br> mysql -u root -p <br>>> use mysql;<br>>> select Host,User,Password,Select_priv,Super_priv from user;<br>>> delete from user where User='';<br>>> delete from user where User='guest';<br />
# Check wiki: http://nuclear.unh.edu/wiki<br />
# UREKA, do a little victory dance!<br />
# Now edit Wiki with update</div>Maurik