https://rt-wiki.bestpractical.com/index.php?title=ConfigureMysqlOnGentoo&feed=atom&action=historyConfigureMysqlOnGentoo - Revision history2024-03-28T21:06:44ZRevision history for this page on the wikiMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=ConfigureMysqlOnGentoo&diff=578&oldid=prevAdmin: 5 revisions imported2016-04-06T20:03:26Z<p>5 revisions imported</p>
<p><b>New page</b></p><div>This guide assumes that RT is running on the same machine as the MySQL server.<br />
<br />
=== Setting a root password for !MySQL on Gentoo (for first time installers) ===<br />
<br />
Switch to the root user of your system.<br />
<br />
$ su -<br />
<br />
<strike>If you have not already done so, MySQL must be installed with the "innodb" USE flag. The easiest way to do this is to add it to /etc/portage/package.use </strike>(this USE flag is deprecated with current versions of MySQL in portage, so you shouldn't need to re-emerge if your MySQL install is recent)<strike>:<br />
</strike><br />
<br />
<strike>dev-db/mysql innodb<br />
</strike><br />
<br />
<strike>and re-emerge MySQL<br />
</strike><br />
<br />
<strike>emerge -av mysql<br />
</strike><br />
Verify that the skip-innodb is commented out in /etc/mysql/my.cnf. If it is not, then put an octothorpe in front of it:<br />
#skip-innodb<br />
and restart the mysql server:<br />
# /etc/init.d/mysql restart<br />
<br />
Add the MySQL server to the default run-level, so that it will load everytime your server boots.<br />
<br />
# rc-update add mysql default<br />
Install the MySQL datase.<br />
# /usr/bin/mysql_install_db<br />
<br />
Start the MySQL server.<br />
<br />
# /etc/init.d/mysql start<br />
<br />
Set or change the root password for MySQL and remove the test database and anonymous user.<br />
<br />
# /usr/bin/mysql_secure_installation<br />
<br />
<br />
<br />
<br />
=== Creating the RT database ===<br />
<br />
RT comes with a script that creates the initial rt4 database.<br />
<br />
# /var/www/myrt/rt-4.0.5/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password<br />
<br />
=== Adding a user for RT to work through ===<br />
<br />
(Our guide uses rt_user; it is recommend that you choose your own name.)<br />
<br />
As root, login to MySQL<br />
<br />
# mysql -p<br />
<br />
Grant access rights to rt_user.<br />
<br />
GRANT ALL PRIVILEGES ON rt4.* TO 'rt_user'@'localhost' IDENTIFIED BY 'p4ssw0rd';<br />
FLUSH PRIVILEGES;<br />
QUIT<br />
<br />
If you want to change rt_user's password, execute the following at the MySQL prompt.<br />
<br />
SET PASSWORD FOR 'rt_user'@'localhost' = PASSWORD('n3wp4ssw0rd');</div>Admin