[SOLVED] Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL host

Moderator: crythias

Locked
MattArtley
Znuny newbie
Posts: 4
Joined: 07 Mar 2013, 15:34
Znuny Version: 3.2.2
Real Name: Matt Artley

[SOLVED] Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL host

Post by MattArtley »

Hello,

I cannot for the life of me get this to work.

I have set up OTRS system with local MYSQL databases no problem. When I try to set it up with a remote host I can't get the installer to finish.

When it gets to the database setup - I get all green ticks, I press next to move onto the next part of the installation, and I get an error with and the opportunity to go back a page and that is all. The error (I need to re-create the scenario as I didn't save it) is to do with the database user on the server where the otrs system is running.

Is there a guide or any info for installing OTRS and using an external MYSQL host? Any info would be great.

thanks,

Matt

EDIT: Just recreated the error, screenshots below:

Image
Set up all the database info and credentials

Image
Get all green ticks, press next

Image
and I get this error
Last edited by MattArtley on 08 Mar 2013, 11:05, edited 2 times in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by crythias »

Install locally to get past this, if you wish.

Then read README.database

Code: Select all

Database Setup Example (MySQL):
===============================

Create OTRS database:
---------------------
shell> mysql -u root -p -e 'create database otrs charset utf8'

Create the OTRS tables:
-----------------------
shell> mysql -u root -p otrs < scripts/database/otrs-schema.mysql.sql

Insert initial data:
-------------------
shell> mysql -u root -p otrs < scripts/database/otrs-initial_insert.mysql.sql

Create foreign keys to other tables:
------------------------------------
shell> mysql -u root -p otrs < scripts/database/otrs-schema-post.mysql.sql

Create a user for the database:
-------------------------------
shell> mysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'

Reload the grant tables of your mysql-daemon:
---------------------------------------------
shell> mysql -u root -p -e 'FLUSH PRIVILEGES;'
But this works only for localhost. So do the following and edit Config.pm to point to it.

Code: Select all

mysql -h myhost -u root -p -e 'create database otrs charset utf8'
mysql -h myhost -u root -p otrs < scripts/database/otrs-schema.mysql.sql
mysql -h myhost -u root -p otrs < scripts/database/otrs-initial_insert.mysql.sql
mysql -h myhost -u root -p otrs < scripts/database/otrs-schema-post.mysql.sql
mysql -h myhost -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'
mysql -h myhost -u root -p -e 'FLUSH PRIVILEGES;'
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MattArtley
Znuny newbie
Posts: 4
Joined: 07 Mar 2013, 15:34
Znuny Version: 3.2.2
Real Name: Matt Artley

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by MattArtley »

crythias wrote:Install locally to get past this, if you wish.

Then read README.database

Code: Select all

Database Setup Example (MySQL):
===============================

Create OTRS database:
---------------------
shell> mysql -u root -p -e 'create database otrs charset utf8'

Create the OTRS tables:
-----------------------
shell> mysql -u root -p otrs < scripts/database/otrs-schema.mysql.sql

Insert initial data:
-------------------
shell> mysql -u root -p otrs < scripts/database/otrs-initial_insert.mysql.sql

Create foreign keys to other tables:
------------------------------------
shell> mysql -u root -p otrs < scripts/database/otrs-schema-post.mysql.sql

Create a user for the database:
-------------------------------
shell> mysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'

Reload the grant tables of your mysql-daemon:
---------------------------------------------
shell> mysql -u root -p -e 'FLUSH PRIVILEGES;'
But this works only for localhost. So do the following and edit Config.pm to point to it.

Code: Select all

mysql -h myhost -u root -p -e 'create database otrs charset utf8'
mysql -h myhost -u root -p otrs < scripts/database/otrs-schema.mysql.sql
mysql -h myhost -u root -p otrs < scripts/database/otrs-initial_insert.mysql.sql
mysql -h myhost -u root -p otrs < scripts/database/otrs-schema-post.mysql.sql
mysql -h myhost -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'
mysql -h myhost -u root -p -e 'FLUSH PRIVILEGES;'
Thanks for your quick response. Do you mean install in locally just to do the install and then carry out the lower part? As I have setup OTRS system's with local mysql databases successfully a bunch of times and I really want to move mysql to it's own box.

sorry I don't fully understand your response. Do the screens I have added above help at all?

Thanks,

Matt
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by crythias »

MattArtley wrote:Do you mean install in locally just to do the install and then carry out the lower part?
Either way. Once you've changed the Config it doesn't matter.
MattArtley wrote:sorry I don't fully understand your response.
I may not fully understand your question, then.
MattArtley wrote:Do the screens I have added above help at all?
Yes, and they should have helped you, too. Especially that "localhost" entry. (Hint: it should be the destination mysql box)

or, more to the point, the error message is explicit in telling you that 'Pinky'@'somelongname' is unable to authenticate, but you told it to create a user 'Pinky'@'localhost'.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MattArtley
Znuny newbie
Posts: 4
Joined: 07 Mar 2013, 15:34
Znuny Version: 3.2.2
Real Name: Matt Artley

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by MattArtley »

crythias wrote:
MattArtley wrote:Do you mean install in locally just to do the install and then carry out the lower part?
Either way. Once you've changed the Config it doesn't matter.
I'm not being intentionally ignorant - I just am not too familiar with OTRS as I have only recently started trying to use it. So I need to edit config.pm, when do I edit it? Before I try and run host/otrs/installer.pl? And do I add the info below

# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
crythias wrote:
MattArtley wrote:sorry I don't fully understand your response.
I may not fully understand your question, then.
My question is that I would like to be able to run through the installer, registration, and have a running OTRS system using an external MYSQL host. And I would like to get past the error I am currently seeing.
crythias wrote:
MattArtley wrote:Do the screens I have added above help at all?
Yes, and they should have helped you, too. Especially that "localhost" entry. (Hint: it should be the destination mysql box)
If I change that localhost entry to that of the MYSQL host then I got a different error. As stated in my original post I have tried this every which way and It errors on them all. I will try and recreate that error for you now.

So yeah I guess I just need to know where to stick those extra config lines in my config.pm file and whether to put them there before or during the running of the installer.
crythias wrote:or, more to the point, the error message is explicit in telling you that 'Pinky'@'somelongname' is unable to authenticate, but you told it to create a user 'Pinky'@'localhost'.
Pinky is the database user and does not exist on the ubuntu 12.04 box - i thought the "localhost" there was referring to the database server, and on the database server, it would be "localhost"

EDIT: if I change that "localhost" to the db hostname I get the following error:

Image

Alternatively, do you think I should set it up all under localhost (with mysql server installed on the ubuntu box) and then dump the database out, import it into my mysql server and just change the relevant things in config.pm?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by crythias »

MattArtley wrote: Before I try and run host/otrs/installer.pl? And do I add the info below
If you ran the install "normally", you'd be able to answer that question from one of your other otrs Config.pm files.

unfortunately, the install script tries to install 'Pinky@...' instead of 'Pinky'@'...'

You've perhaps found a bug.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
MattArtley
Znuny newbie
Posts: 4
Joined: 07 Mar 2013, 15:34
Znuny Version: 3.2.2
Real Name: Matt Artley

Re: Amazon AWS, Ubuntu 12.04 and OTRS 3.2.2 - Remote MYSQL h

Post by MattArtley »

I have fixed it in a round about fashion.

I ran the installer with mostly default settings, let it set up a local mysql database, got the system up and running, then took a dump of the local mysql database, dumped that into my mysql server and changed the relevant references in config.pm

Thanks for the assistance.
Locked