I can't connect or create database during instalation

Moderator: crythias

Post Reply
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

I can't connect or create database during instalation

Post by DavCZa »

Hello.

I can't connect or create database during instalation. I did this https://doc.znuny.org/manual/releases/i ... stall.html and in Firefox go to ...otrs/installer.pl and in the step 2 message appears "Can't connect to database".

But it seems, that in instalation manual is nothing about create new database...
Do I need to create a database in bash? Under which user?

Thanks people and best regards.

David K.
shawnbeasley
Znuny Employee
Posts: 132
Joined: 13 Sep 2021, 09:38
Znuny Version: Znuny 6.3.x
Real Name: Shawn Beasley
Company: Znuny

Re: I can't connect or create database during instalation

Post by shawnbeasley »

Hi,

2 Things

* root will need a password
* make suer the bind address https://linuxhint.com/change-mysql-bind ... 590a796996 is localhost
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

Hello.

Of course, my root has password. And I found in my Debian 11, that bind is localhost (in /etc/mysql/mariadb.conf.d/50-server.cnf)

Code: Select all

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]

#
# * Basic Settings
#

user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
lc-messages             = en_US
skip-external-locking

# Broken reverse DNS slows down connections considerably and name resolve is
# safe to skip if there are no "host by domain name" access grants
#skip-name-resolve

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1

#
# * Fine Tuning
#

#key_buffer_size        = 128M
#max_allowed_packet     = 1G
#thread_stack           = 192K
#thread_cache_size      = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
#myisam_recover_options = BACKUP
#max_connections        = 100
#table_cache            = 64

#
# * Logging and Replication
#

# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# Recommend only changing this at runtime for short testing periods if needed!
#general_log_file       = /var/log/mysql/mysql.log
#general_log            = 1

# When running under systemd, error logging goes via stdout/stderr to journald
# and when running legacy init error logging goes to syslog due to
# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
# Enable this if you want to have error logging into a separate file
#log_error = /var/log/mysql/error.log
# Enable the slow query log to see queries with especially long duration
#slow_query_log_file    = /var/log/mysql/mariadb-slow.log
#long_query_time        = 10
#log_slow_verbosity     = query_plan,explain
#log-queries-not-using-indexes
#min_examined_row_limit = 1000

# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
#max_binlog_size        = 100M

#
# * SSL/TLS
#

# For documentation, please read
# https://mariadb.com/kb/en/securing-connections-for-client-and-server/
#ssl-ca = /etc/mysql/cacert.pem
#ssl-cert = /etc/mysql/server-cert.pem
#ssl-key = /etc/mysql/server-key.pem
#require-secure-transport = on

#
# * Character sets
#

# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
# utf8 4-byte character set. See also client.cnf
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci

#
# * InnoDB
#

# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# Most important is to give InnoDB 80 % of the system RAM for buffer use:
# https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size
#innodb_buffer_pool_size = 8G

# this is only for embedded server
[embedded]

# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.5]
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: I can't connect or create database during instalation

Post by wurzel »

Hi,

insert the sql files manually in the mysql shell
or use a second user with full permission. root ususally prevents full access on some installations.
basically on mariadb there are limitations.

Here is a german article about this issue, maybe it helps
https://kofler.info/root-login-problem-mit-mariadb/

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: I can't connect or create database during instalation

Post by root »

Hi,

Please post the error which is shown in the webserver error log / application log.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

from /var/log/apache2/error.log

Code: Select all

[Fri Apr 22 12:21:32.895757 2022] [mpm_prefork:notice] [pid 828] AH00163: Apache/2.4.53 (Debian) mod_perl/2.0.11 Perl/v5.32.1 configured -- resuming normal operations
[Fri Apr 22 12:21:32.896533 2022] [core:notice] [pid 828] AH00094: Command line: '/usr/sbin/apache2'
[Fri Apr 22 12:28:29 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:29 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (882): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::Valid::ValidList Line: 75
   Module: Kernel::System::Valid::ValidLookup Line: 121
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 179
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:29 2022

 Message: No Valid for valid found!

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (882): 
   Module: Kernel::System::Valid::ValidLookup Line: 140
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 179
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:29 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:29 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (882): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::State::StateGetStatesByType Line: 399
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 179
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:34 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:34 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::Valid::ValidList Line: 75
   Module: Kernel::System::Valid::ValidLookup Line: 121
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 205
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:34 2022

 Message: No Valid for valid found!

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::Valid::ValidLookup Line: 140
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 205
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:34 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:34 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::State::StateGetStatesByType Line: 399
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 205
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:38 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:38 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::Valid::ValidList Line: 75
   Module: Kernel::System::Valid::ValidLookup Line: 121
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 259
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:38 2022

 Message: No Valid for valid found!

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::Valid::ValidLookup Line: 140
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 259
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:38 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:38 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::State::StateGetStatesByType Line: 399
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 259
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:42 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:42 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::Valid::ValidList Line: 75
   Module: Kernel::System::Valid::ValidLookup Line: 121
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 359
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:42 2022

 Message: No Valid for valid found!

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::Valid::ValidLookup Line: 140
   Module: Kernel::System::Valid::ValidIDsGet Line: 161
   Module: Kernel::System::State::StateGetStatesByType Line: 397
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 359
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:42 2022] -e: DBI connect('database=otrs;host=127.0.0.1;','otrs',...) failed: Access denied for user 'otrs'@'localhost' at /opt/otrs/Kernel/System/DB.pm line 209.
ERROR: OTRS-CGI-10 Perl: 5.32.1 OS: linux Time: Fri Apr 22 10:28:42 2022

 Message: Access denied for user 'otrs'@'localhost'

 RemoteAddress: 127.0.0.1
 RequestURI: /otrs/installer.pl

 Traceback (886): 
   Module: Kernel::System::DB::Prepare Line: 683
   Module: Kernel::System::State::StateGetStatesByType Line: 399
   Module: Kernel::Output::HTML::Layout::Footer Line: 1632
   Module: Kernel::Modules::Installer::Run Line: 359
   Module: Kernel::System::Web::InterfaceInstaller::Run Line: 129
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_installer_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Fri Apr 22 12:28:59 2022] -e: DBI connect('database=;host=127.0.0.1;','root',...) failed: Access denied for user 'root'@'localhost' at /opt/otrs/Kernel/Modules/Installer.pm line 1159.
SV = PV(0x5609e9cdd420) at 0x5609ea5317a0
  REFCNT = 2
  FLAGS = ()
  PV = 0
SV = PV(0x5609e9cdd120) at 0x5609ea55aa48
  REFCNT = 2
  FLAGS = ()
  PV = 0
[Fri Apr 22 12:36:31.705660 2022] [mpm_prefork:notice] [pid 828] AH00170: caught SIGWINCH, shutting down gracefully
SV = PV(0x5609e6ffee20) at 0x5609eabc3e28
  REFCNT = 2
  FLAGS = ()
  PV = 0
[Fri Apr 22 12:37:01.332810 2022] [mpm_prefork:notice] [pid 816] AH00163: Apache/2.4.53 (Debian) mod_perl/2.0.11 Perl/v5.32.1 configured -- resuming normal operations
[Fri Apr 22 12:37:01.334400 2022] [core:notice] [pid 816] AH00094: Command line: '/usr/sbin/apache2'
skullz
Znuny superhero
Posts: 618
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: I can't connect or create database during instalation

Post by skullz »

DavCZa wrote: 14 Apr 2022, 13:28 Hello.

I can't connect or create database during instalation. I did this https://doc.znuny.org/manual/releases/i ... stall.html and in Firefox go to ...otrs/installer.pl and in the step 2 message appears "Can't connect to database".

But it seems, that in instalation manual is nothing about create new database...
Do I need to create a database in bash? Under which user?

Thanks people and best regards.

David K.
Screenshot will be good..as far my memory served me right, there are 2 option in this database section.

1. Create new database - you have to put db root access credential here. The installer will create otrs db structure on behalf on you.

2. Use empty database - you have to manually create the db, assign user and password and then put the credentials details there ..
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: I can't connect or create database during instalation

Post by root »

Hi,

What was the result when you clicked on the button "Check database settings"? Maybe you can share which fields you filled.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

Hello people.

I apologize for the delay in my response.

Here are screen screenshots, including a log listing.
You do not have the required permissions to view the files attached to this post.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: I can't connect or create database during instalation

Post by wurzel »

hi,

did you read my postings?

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: I can't connect or create database during instalation

Post by hkais »

DavCZa wrote: 16 May 2022, 11:21 Hello people.

I apologize for the delay in my response.

Here are screen screenshots, including a log listing.

Looks like you have never used a database before? You should get a admin aside to get help or you hire a znuny expert, which use a database like a hammer in a craftsman toolbox ;-)
If you are struggeling already with a database connection the success-path for having a well running Znuny is probably not on your map.


Anyway here the commands to report us by login to mysql

mysql -u <username> -p <password>

so simply do

Code: Select all

mysql -u root -p <yourMysqlRootPassword>
after login

Code: Select all

show databases;
select host, user, password from mysql.user;
here you shall see your otrs database if you pre-created it

if above command worked well, run

Code: Select all

mysql -u otrs -p <yourMysqlOtrsPassword>
and rerun the above show databases once more
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

Ok. So, I have these databases

Code: Select all

+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
and these users

Code: Select all

+-----------+-------------+----------+-----------------------+
| Host      | User        | Password | plugin                |
+-----------+-------------+----------+-----------------------+
| localhost | mariadb.sys |          | mysql_native_password |
| localhost | root        | invalid  | mysql_native_password |
| localhost | mysql       | invalid  | mysql_native_password |
+-----------+-------------+----------+-----------------------+
If I understand correctly, I do not have a pre-created database and no otrs user in mysql. I have only user in system

Code: Select all

otrs:x:1001:33:Znuny user:/opt/otrs:/bin/bash
If I enter the command

Code: Select all

mysql -u otrs -p
I have to enter the password and where should I get it?
I'm a big novice, but I want to get involved.
Last edited by DavCZa on 17 May 2022, 12:09, edited 2 times in total.
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

wurzel wrote: 16 May 2022, 18:00 hi,

did you read my postings?

Flo
Hello Flo,

Yes, I was looking at it. Thank You for it. I'm still thinking about how to do it. I thought installing Znuny according to the instructions would be easy, but it won't work that way.
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: I can't connect or create database during instalation

Post by hkais »

if your Znuny installation is on the same host as your database it should work very simple

Use the Installer UI
enter root / mysqlRootPassword
and the installer will create for you database + user + permissions

have you done/tried this already?

also have you tried to use
localhost instead of 127.0.0.1?
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

hkais wrote: 17 May 2022, 16:50 if your Znuny installation is on the same host as your database it should work very simple

Use the Installer UI
enter root / mysqlRootPassword
and the installer will create for you database + user + permissions

have you done/tried this already?

also have you tried to use
localhost instead of 127.0.0.1?
I know. It should work very simple but it not works :(

"Can't connect to database, read comment!
Access denied for user 'root'@'localhost'"
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: I can't connect or create database during instalation

Post by hkais »

DavCZa wrote: 18 May 2022, 14:35
hkais wrote: 17 May 2022, 16:50 if your Znuny installation is on the same host as your database it should work very simple

Use the Installer UI
enter root / mysqlRootPassword
and the installer will create for you database + user + permissions

have you done/tried this already?

also have you tried to use
localhost instead of 127.0.0.1?
I know. It should work very simple but it not works :(

"Can't connect to database, read comment!
Access denied for user 'root'@'localhost'"
the root password is the same as the password used for

mysql -u root -p

right?
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

Sorry for the long pause. I needed to do a lot of other things.

So, Yes. The root password is the same as the password used for "mysql -u root -p".

Could the problem be that I'm not a sudo user?
Johannes
Moderator
Posts: 391
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: I can't connect or create database during instalation

Post by Johannes »

I would guess the default MariaDB blocks non Socket Connection.
Can you just create a new user and grant permissions and test that again?
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: I can't connect or create database during instalation

Post by wurzel »

Hi,

Johannes is correct!

as I have written in one of my first postings...

mysql root can not connect as it is not allowed in the webinstaller. mysql root only can connect on the shell in the debian 11 default configuration.
You must create a new user with root permission in mysql if you want to use the web installer.
for example

Code: Select all

grant all on *.* to newadminuser@localhost identified by 'xxx' with grant option;
Or you have to allow mysql root the permission to get access
Or you insert the sql files manually



Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
DavCZa
Znuny newbie
Posts: 10
Joined: 12 Apr 2022, 13:20
Znuny Version: 6.5.4
Real Name: David

Re: I can't connect or create database during instalation

Post by DavCZa »

Bingo.

I created user and granted all privileges for my db (for otrs.*) only.
Thank You very much.

I had to change character set to utf8. Should I to change collation to utf8_bin, too?

Have a nice day, people.
Post Reply