<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - How to Upgrade MySQL to 4.0.x for SME Server feedback</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>How to Upgrade MySQL to 4.0.x for SME Server feedback</h1>
</div>
<div id="content">



<div class="wikitext"><p class="tightenable top bottom"><a href="Documentation.html" class="wiki">Documentation</a> &gt; <a href="How-to%20Classification.html" class="wiki">How-to Classification</a> &gt; <a href="MySQL.html" class="wiki">MySQL</a> &gt; <a href="How%20to%20Upgrade%20MySQL%20to%204.0.x%20for%20SME%20Server.html" class="wiki">How to Upgrade MySQL to 4.0.x for SME Server</a>  &gt; <b>Feedback</b> <br /></p>
<hr />
<p class="tightenable top">Give your comments on <a href="How%20to%20Upgrade%20MySQL%20to%204.0.x%20for%20SME%20Server.html" class="wiki">How to Upgrade MySQL to 4.0.x for SME Server</a> here. Thanks in advance!
<br /></p>
<p class="tightenable bottom">One too many lines deleted in your last edit...<br />
above:<br />
ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/init.d/mysql<br />
you still need:<br />
mv /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld<br />
<br />
and a note if this is used with (at least with the beta) 6.5 is you need to specify the mysql root password when running the fix_privilege_tables part - this will get it automatically if used in a script:</p>
<pre class="tightenable top">
MYSQL_PW=`sed q /etc/openldap/ldap.pw`
/usr/bin/mysql_fix_privilege_tables --user=root --password=$MYSQL_PW</pre>
<p class="tightenable">*****************************************************</p>
<p class="tightenable">In fact the Howto doesn't work as a result of this root user password problem. So why not add lines that reset the password before attempting to fix the privilege tables?</p>
<p class="tightenable">Here is a new version of the Howto incororating that change...</p>
<p class="tightenable">This changed Howto deals with problems found with update to MySQL 4.1.10a-standard on a box loaded with a customised 6.0.1 server. It adds lines from Dan Brown's 'How to change the MySQL root password in SME Server 5.1.2' to reset the MySQL root access password before attempting to use it to fix the privilege tables etc.</p>
<p class="tightenable">1) DOWNLOAD MySQL 4.0</p>
<p class="tightenable">Download MySQL 4.0 rpms from mysql.com in a fresh directory (Linux x86 RPM downloads section).</p>
<dl><dt class="tightenable">You need</dt>
<dd class="tightenable"><ul><li class="tightenable top bottom">MySQL-shared-compat-4.1.x-0.i386.rpm</li>
<li class="tightenable top bottom">MySQL-server-4.1.x-0.i386.rpm</li>
<li class="tightenable top bottom">MySQL-client-4.1.x-0.i386.rpm</li>
<li class="tightenable top bottom">MySQL-devel-4.1.x-0.i386.rpm</li>
</ul>
</dd>
</dl>
<p class="tightenable">Note: replace 4.1.x with current MySQL version available (I used 4.1.10a)</p>
<p class="tightenable">2) STOP MYSQL</p>
<blockquote class="tightenable"><p class="tightenable top bottom">service mysqld stop</p>
</blockquote>
<p class="tightenable">3) REMOVE OLD RPMS</p>
<blockquote class="tightenable"><p class="tightenable top bottom">rpm -e --nodeps mysql mysql-server<br />
rpm -e mysql-devel<br />
rpm -e mysqlclient9<br /></p>
</blockquote>
<p class="tightenable bottom">4) INSTALL NEW RPMS</p>
<dl><dt class="tightenable top">Cd to the directory where you downloaded the rpms and do</dt>
<dd class="tightenable">rpm -Uvh MySQL-*.rpm</dd>
</dl>
<p class="tightenable">OR</p>
<blockquote class="tightenable"><p class="tightenable top">rpm -Uhv MySQL-shared-compat-4.1.x-0.i386.rpm</p>
<p class="tightenable">rpm -Uhv MySQL-server-4.1.x-0.i386.rpm</p>
<p class="tightenable">rpm -Uhv MySQL-client-4.1.x-0.i386.rpm</p>
<p class="tightenable bottom">rpm -Uvh MySQL-devel-4.1.x-0.i386.rpm</p>
</blockquote>
<p class="tightenable">Note: replace 4.1.x with current MySQL version available (I used 4.1.10a)</p>
<p class="tightenable">5) CONFIGURE</p>
<blockquote class="tightenable"><blockquote class="tightenable"><p class="tightenable top">chkconfig --levels 2345 mysql on</p>
<p class="tightenable">mv /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld</p>
<p class="tightenable">rm /etc/rc.d/rc7.d/S90mysqld</p>
<p class="tightenable">ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc7.d/S90mysqld</p>
<p class="tightenable">/sbin/e-smith/config setprop mysqld <a href="LocalNetworkingOnly.html" class="wiki">LocalNetworkingOnly</a> no (enables remote access)</p>
<p class="tightenable">/sbin/e-smith/expand-template /root/.my.cnf</p>
<p class="tightenable bottom">ln -s /usr/sbin/mysqld /usr/libexec/ (for conf-mysql-password script)</p>
</blockquote>
<p class="tightenable top bottom">/etc/rc.d/init.d/mysqld start</p>
</blockquote>
<p class="tightenable">Then to make sure that your grant tables are current when you update to the new version, first reset the root password...</p>
<blockquote class="tightenable"><p class="tightenable top">/etc/rc.d/init.d/mysqld stop</p>
<p class="tightenable">/etc/e-smith/events/actions/conf-mysql-password</p>
<p class="tightenable bottom">/etc/rc.d/init.d/mysqld start</p>
</blockquote>
<p class="tightenable">Then run...</p>
<blockquote class="tightenable"><p class="tightenable top bottom">/usr/bin/mysql_fix_privilege_tables</p>
</blockquote>
<p class="tightenable">More info here: <a href="http://dev.mysql.com/doc/mysql/en/Upgrading-grant-tables.html" target="" class="namedurl"><span style="white-space: nowrap"><img src="images/http.png" alt="" class="linkicon" border="0" />http://dev.mysql.com/doc/mysql/en/Upgrading-grant-tables.html</span></a></p>
<p class="tightenable bottom">6) OPTIONAL: INNODB SUPPORT</p>
<dl><dt class="tightenable top">Create a custom-template fragment</dt>
<dd class="tightenable">mkdir -p /etc/e-smith/templates-custom/etc/my.cnf
cp /etc/e-smith/templates/etc/my.cnf/009innodb /etc/e-smith/templates-custom/etc/my.cnf
pico /etc/e-smith/templates-custom/etc/my.cnf/009innodb</dd>
</dl>
<p class="tightenable">And comment the only line it contains so the file should look like this:</p>
<ol><li class="tightenable">skip-innodb</li>
</ol>
<dl><dt class="tightenable">Save the file then do</dt>
<dd class="tightenable bottom">/sbin/e-smith/expand-template /etc/my.cnf<br />
service mysqld restart<br /></dd>
</dl>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;elorenz&quot;  Last edited on December 10, 2005  8:21 am by &quot;elorenz&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
