Help with mysql tables rt2 -> rt3

Dear RT Folks,

In RT2 that we migrated from, the mysql table itself
was able to be used,

mysql > use mysql;
Database changed

however in the RT3 server (3.0.9, mysql 4.0.17)
I somehow managed to put up a working RT3 install
that has no mysql tables. Not sure how, but here is what happens:

mysql > use mysql;

ERROR 1044: Access denied for user: ‘root@localhost’ to database ‘mysql’

We have a working rt3 with this, but now we have to add to the mysql
users, and we’re stuck.

We are thinking of standing up a different mysql 4.0.17 server,
tarring cvf /var/lib/mysql/mysql.tar /var/lib/mysql/mysql
then tar xvf that same tarfile back on top of the existing
mysql install with the fully configured rt3 .

Will this re-enable the mysql table rights without touching anything
in the table for rt3 ?

Thanks!

Dave Dennis wrote:

however in the RT3 server (3.0.9, mysql 4.0.17)
I somehow managed to put up a working RT3 install
that has no mysql tables. Not sure how, but here is what happens:

RT3 uses the “rt3” database. The “mysql” database is none of
its concern (aside from providing the required rt_user account
for RT to access the rt3 database, that is…)

mysql > use mysql;
ERROR 1044: Access denied for user: ‘root@localhost’ to database ‘mysql’

Someone has deleted root@localhost’s access to the database.
That’s not an RT problem, however www.mysql.com does tell
you how to recover from problems like that.

We are thinking of standing up a different mysql 4.0.17 server,
tarring cvf /var/lib/mysql/mysql.tar /var/lib/mysql/mysql
then tar xvf that same tarfile back on top of the existing
mysql install with the fully configured rt3 .

That would be bad. It might work, it might not, and it would
certainly cause your RT3 instance to become unusable.

mysql > use mysql;

ERROR 1044: Access denied for user: ‘root@localhost’ to database
‘mysql’

It seems your MySQL permissions got hosed. To fix:

  • Start mysqld with --skip-grant-tables. This will give everyone
    permission to do everything, so make sure that nobody but you can
    access the MySQL server during this stage (i.e., disconnect the machine
    from the network).
  • Add an entry to the appropriate table in the mysql database, so that
    root has useful privileges again.
  • “flush privileges” or restart mysqld without --skip-grant-tables, so
    that permissions are enforced again.
  • Test and make sure that the permissions work as you expect.
  • Reconnect the box to the network.

However, this is not an RT-related problem, so I’d suggest turning to a
MySQL mailing list if you need more help.

We are thinking of standing up a different mysql 4.0.17 server,
tarring cvf /var/lib/mysql/mysql.tar /var/lib/mysql/mysql
then tar xvf that same tarfile back on top of the existing
mysql install with the fully configured rt3 .

Messing with table files manually seems like a BadIdea[tm] to me,
unless you like broken and inconsistent data.

Sebastian

Sebastian Flothow
sebastian@flothow.de

Because it reverses the logical flow of conversation.

Dear PDH,

Great, that narrows the focus significantly, thanks.

If anyone has link to where at mysql.com describes this
it would be greatly appreciated. Or what terms to search
under with their engine… Still searching…

Kind regards,

Dave Dennis wrote:

however in the RT3 server (3.0.9, mysql 4.0.17)
I somehow managed to put up a working RT3 install
that has no mysql tables. Not sure how, but here is what happens:

RT3 uses the “rt3” database. The “mysql” database is none of
its concern (aside from providing the required rt_user account
for RT to access the rt3 database, that is…)

mysql > use mysql;
ERROR 1044: Access denied for user: ‘root@localhost’ to database ‘mysql’

Someone has deleted root@localhost’s access to the database.
That’s not an RT problem, however www.mysql.com does tell
you how to recover from problems like that.

We are thinking of standing up a different mysql 4.0.17 server,
tarring cvf /var/lib/mysql/mysql.tar /var/lib/mysql/mysql
then tar xvf that same tarfile back on top of the existing
mysql install with the fully configured rt3 .

That would be bad. It might work, it might not, and it would
certainly cause your RT3 instance to become unusable.


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.