ConfigureMysqlOnGentoo

From Request Tracker Wiki
Revision as of 16:03, 6 April 2016 by Admin (talk | contribs) (5 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This guide assumes that RT is running on the same machine as the MySQL server.

Setting a root password for !MySQL on Gentoo (for first time installers)

Switch to the root user of your system.

$ su -

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 (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):

dev-db/mysql innodb

and re-emerge MySQL

emerge -av mysql

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:

#skip-innodb

and restart the mysql server:

# /etc/init.d/mysql restart

Add the MySQL server to the default run-level, so that it will load everytime your server boots.

# rc-update add mysql default

Install the MySQL datase.

# /usr/bin/mysql_install_db

Start the MySQL server.

# /etc/init.d/mysql start

Set or change the root password for MySQL and remove the test database and anonymous user.

# /usr/bin/mysql_secure_installation



Creating the RT database

RT comes with a script that creates the initial rt4 database.

# /var/www/myrt/rt-4.0.5/sbin/rt-setup-database --action init --dba root --prompt-for-dba-password

Adding a user for RT to work through

(Our guide uses rt_user; it is recommend that you choose your own name.)

As root, login to MySQL

# mysql -p

Grant access rights to rt_user.

GRANT ALL PRIVILEGES ON rt4.* TO 'rt_user'@'localhost' IDENTIFIED BY 'p4ssw0rd';
FLUSH PRIVILEGES;
QUIT

If you want to change rt_user's password, execute the following at the MySQL prompt.

SET PASSWORD FOR 'rt_user'@'localhost' = PASSWORD('n3wp4ssw0rd');