# How do I set a custom MySQL IP address?

**URL:** <https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601>\
**Category:** Technical assistance\
**Created:** [June 8, 2019, 1:28pm UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601 "2019-06-08T13:28:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rocky](https://community.zammad.org/letter_avatar_proxy/v4/letter/r/278dde/32.png) [@Rocky](https://community.zammad.org/u/Rocky)\
**Post date:** [June 8, 2019, 1:28pm UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/1 "2019-06-08T13:28:14Z")

</div>

I’m following these instructions to install Zammad on Ubuntu 18.04:

[https://docs.zammad.org/en/latest/install-source.html#install-from-source-debian-7-8-ubuntu-16-04-ubuntu-18-04](https://docs.zammad.org/en/latest/install-source.html#install-from-source-debian-7-8-ubuntu-16-04-ubuntu-18-04)

But there is nothing in there to tell me how to customize database IP address, how do I change the database IP address? I have a dedicated MySQL server and don’t want to run it on localhost.

Thanks.

---

<div class="post-metadata">

**Author:** ![Rocky](https://community.zammad.org/letter_avatar_proxy/v4/letter/r/278dde/32.png) [@Rocky](https://community.zammad.org/u/Rocky)\
**Post date:** [June 8, 2019, 2:07pm UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/2 "2019-06-08T14:07:59Z")

</div>

I got the database working and rake db:migrate worked fine but rake db:seed doesn’t work.

```
zammad@zammad:~$ rake db:seed
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect string value: '\xD0\x91\xD1\x8A\xD0\xBB...' for column 'name' at row 1: INSERT INTO `locales` (`locale`, `alias`, `name`, `created_at`, `updated_at`) VALUES ('bg', '', 'Bulgarian (Български)', '2019-06-08 14:01:58.807000', '2019-06-08 14:01:58.807000')
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:214:in `block (2 levels) in execute'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:213:in `block in execute'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block (2 levels) in log'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block in log'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:604:in `log'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:212:in `execute'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/mysql/database_statements.rb:26:in `execute'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:223:in `execute_and_free'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in `exec_query'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:102:in `exec_insert'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:133:in `insert'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/query_cache.rb:17:in `insert'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/relation.rb:61:in `insert'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/persistence.rb:583:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/counter_cache.rb:176:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/locking/optimistic.rb:69:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/attribute_methods/dirty.rb:297:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/callbacks.rb:344:in `block in _create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:827:in `_run_create_callbacks'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/callbacks.rb:344:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/timestamp.rb:102:in `_create_record'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/persistence.rb:554:in `create_or_update'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/callbacks.rb:340:in `block in create_or_update'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:827:in `_run_save_callbacks'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/callbacks.rb:340:in `create_or_update'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/persistence.rb:162:in `save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/validations.rb:50:in `save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/attribute_methods/dirty.rb:43:in `save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:313:in `block in save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:233:in `transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:210:in `transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:313:in `save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/suppressor.rb:46:in `save!'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/persistence.rb:51:in `create!'
/opt/zammad/app/models/locale.rb:129:in `block (2 levels) in to_database'
/opt/zammad/app/models/locale.rb:124:in `each'
/opt/zammad/app/models/locale.rb:124:in `block in to_database'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/transactions.rb:210:in `transaction'
/opt/zammad/app/models/locale.rb:123:in `to_database'
/opt/zammad/app/models/locale.rb:63:in `load'
/opt/zammad/app/models/locale.rb:48:in `sync'
/opt/zammad/db/seeds.rb:33:in `<top (required)>'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:286:in `load'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:286:in `block in load'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:258:in `load_dependency'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activesupport-5.1.7/lib/active_support/dependencies.rb:286:in `load'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/railties-5.1.7/lib/rails/engine.rb:549:in `load_seed'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
/opt/zammad/.rvm/gems/ruby-2.4.4/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/opt/zammad/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `eval'
/opt/zammad/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
```

---

<div class="post-metadata">

**Author:** ![Rocky](https://community.zammad.org/letter_avatar_proxy/v4/letter/r/278dde/32.png) [@Rocky](https://community.zammad.org/u/Rocky)\
**Post date:** [June 8, 2019, 2:35pm UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/3 "2019-06-08T14:35:12Z")

</div>

I ignored the rake db:seed errors and continued installation.

When I **click** on the **Knowledge Base** option and **then** click on **Time Accounting** or some other options the UI is corrupted and displays things twice, like this:

 ![zammad](https://community.zammad.org/uploads/default/original/2X/2/2b1028648bb0ae57041fba3cf7625daa74da875e.png)

I tested this in the latest versions of Firefox and Edge browsers, both give the same problem.

---

<div class="post-metadata">

**Author:** ![Rocky](https://community.zammad.org/letter_avatar_proxy/v4/letter/r/278dde/32.png) [@Rocky](https://community.zammad.org/u/Rocky)\
**Post date:** [June 8, 2019, 2:43pm UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/4 "2019-06-08T14:43:40Z")

</div>

Another problem:

Email subjects are corrupted, they have =0A at the end like this:

" Helpdesk signin detected from a new device=0A"  
" Invitation to Helpdesk at help.redacted.com=0A"

---

<div class="post-metadata">

**Author:** ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)\
**Post date:** [June 10, 2019, 12:34am UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/5 "2019-06-10T00:34:04Z")

</div>

Welcome.  
First, here’s some lecture for you:  
[https://community.zammad.org/t/asking-for-help-on-community/2262/2](https://community.zammad.org/t/asking-for-help-on-community/2262/2)

> [@Rocky](#):
>
> I ignored the rake db:seed errors and continued installation.

Secondly, your installation is not finished with ignoring that.

> [@Rocky](#):
>
> ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect string value: ‘\xD0\x91\xD1\x8A\xD0\xBB…’ for column ‘name’ at row 1: INSERT INTO `locales` (`locale`, `alias`, `name`, `created_at`, `updated_at`) VALUES (‘bg’, ‘’, ‘Bulgarian (Български)’, ‘2019-06-08 14:01:58.807000’, ‘2019-06-08 14:01:58.807000’) /opt/zammad/.rvm/gems/ruby-2.4.4/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `\_query’

You might want to ensure that you’re using an UTF-8 based database.  
You’ll run in more and more errors, if you don’t fix that.

(I’ll ignore the other problems you experience, because the above needs to be fixed first)

> [@Rocky](#):
>
> But there is nothing in there to tell me how to customize database IP address, how do I change the database IP address? I have a dedicated MySQL server and don’t want to run it on localhost.

You’ll need to add `host: xyz` to your database.yml.  
Please note that we had better experience with postgresql.

---

<div class="post-metadata">

**Author:** ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)\
**Post date:** [October 8, 2019, 12:34am UTC](https://community.zammad.org/t/how-do-i-set-a-custom-mysql-ip-address/2601/6 "2019-10-08T00:34:05Z")

</div>

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
