Zabbix Upgrade - database upgrade failed 5.0.8 to 6.2 - zabbix

I am doing to upgrade Zabbix 5.0 to 6.2 within old data but it's failed when upgrade database. how to fix it? why happing this error?
error:
524255:20220727:120501.638 database upgrade failed
524259:20220727:120513.877 Starting Zabbix Server. Zabbix 6.2.0rc3 (revision 0e0e9f05882).
524259:20220727:120513.877 ****** Enabled features ******
524259:20220727:120513.877 SNMP monitoring: YES
524259:20220727:120513.877 IPMI monitoring: YES
524259:20220727:120513.877 Web monitoring: YES
524259:20220727:120513.877 VMware monitoring: YES
524259:20220727:120513.877 SMTP authentication: YES
524259:20220727:120513.877 ODBC: YES
524259:20220727:120513.877 SSH support: YES
524259:20220727:120513.877 IPv6 support: YES
524259:20220727:120513.877 TLS support: YES
524259:20220727:120513.877 ******************************
524259:20220727:120513.877 using configuration file: /etc/zabbix/zabbix_server.conf
524259:20220727:120513.887 current database version (mandatory/optional): 05010052/05010052
524259:20220727:120513.887 required mandatory version: 06010097
524259:20220727:120513.887 starting automatic database upgrade
524259:20220727:120513.887 [Z3005] query failed: [1050] Table 'role' already exists [create table role (
roleid bigint unsigned not null,
name varchar(255) default '' not null,
type integer default '0' not null,
readonly integer default '0' not null,
primary key (roleid)
) engine=innodb]
524259:20220727:120513.887 database upgrade failed

Related

Issues with helm install Orion Context Broker

I'm trying to install FIWARE Orion on AKS using your Helm chart. I installed MongoDB using
helm repo add azure-marketplace https://marketplace.azurecr.io/helm/v1/repo
helm install my-release azure-marketplace/mongodb
Consequently I configured the MongoDB in values.yaml as follows:
## database configuration
db:
# -- configuration of the mongo-db hosts. if multiple hosts are inserted, its assumed that mongo is running as a replica set
hosts: [my-release-mongodb]
# - my-release-mongodb
# -- the db to use. if running in multiservice mode, its used as a prefix.
name: orion
# -- Database authentication (not needed if MongoDB doesn't use --auth)
auth:
# --user for connecting mongo
user: root
# -- password to be used on mongo
password: mypasswd
# -- the MongoDB authentication mechanism to use in the case user and password is set
#mech: SCRAM-SHA-1
I use the command : helm install test orion
As I see this error in the pod logging I suppose something is wrong;
kubectl logs test-orion-7dfcc9c7fb-8vbgw
time=2021-05-28T19:50:29.737Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=mongocContextCachePersist.cpp[59]:mongocContextCachePersist | msg=Database Error (persisting context: command insert requires authentication)
Can you help me with this please?
Kind regards,
Johan,
you should assure that mongo-db is actually available at "my-release-mongodb:27017", you can use "kubectl get services" for that. Beside that, assure that "root:mypasswd" are actually the credentials setup at mongodb.

Unable to determine current Zabbix database version: the table "dbversion" was not found

OS: Debian10
App: Zabbix4.0
Installed app:Mariadb,Apache2,php
I got this error after I input this command in mysql.
create database zabbix character set utf8 collate utf8_bin;
and when I tried to restart zabbix-server,
zabbix-server.service: Can't open PID file /run/zabbix/zabbix_server..
Any idea regarding this error?
The problem with Zabbix database can be solved with the following command:
sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix_db
where zabbix_db is your Zabbix database name in which you named in MySQL configuration.
Then you need to restart your zabbix-server.
I solved this problem by simply installing the newer version of zabbix which is 4.4 or 5.0. If this kind of problem occurs, I would suggest for you to install the newer version of Zabbix.
This message means you don't have schema just run zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
after that enter password wait around 10-30sec when import schema will be done for Ubuntu run:
systemctl restart zabbix-server zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-agent httpd php-fpm
Then go to http://server_ip_or_name/zabbix
and complete setup.

Permission denied when starting MySQL Server from MySQL Workbench in Ubuntu

I am using Linux Ubuntu 14.04 LTS, i installed Mysql Workbench using the Ubuntu software center. Now, i am unable to start the server both when i open a connection or i click on Start Server button.
The server is configured to run on localhost:3306 (the default configuration).
Here is the Mysql Workbench Startup Message Log:
2016-02-28 12:10:27 - Checked server status: Server is stopped.
2016-02-28 12:10:35 - Checked server status: Server is stopped.
2016-02-28 12:10:50 - Starting server...
2016-02-28 12:10:50 - Executting '/etc/init.d/mysqld start'
2016-02-28 12:10:53 - Checked server status: Server is stopped.
2016-02-28 12:10:59 - Could not stop server. Permission denied
2016-02-28 12:10:59 - Checked server status: Server is stopped.
You need to do this with root privileges, so you need the ability to use sudo. You will be prompted for your password when you do this. If you are not allowed, then you have to apply for sudo access.
I think also your actual problem is you don't have mysql server installed. Not too sure what workbench is. If you want to make databases and tables and store information on the server, you need to install mysql server. At the command prompt:
$ sudo apt-get install mysql-server
to install server. Then to run
$ sudo bash
$ service mysql start
or
$ mysqld_safe
Then to find out if it is running
$ service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2016-02-28 22:31:48 AEDT; 3min 11s ago
The line saying "Active: ..." is what you are looking for

OpenShift add cartridge MySQL 5.5 engine InnoDB

when i do rhc cartridge add mysql-5.5 --app NameApp the engine default of DB is MyISAM. But if i need engine InnoDB, how can i create db on OpenShift?
The default storage engine for mysql is set with an environment variable. Add the cartridge, then run the below to use InnoDB:
$ rhc env add OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=InnoDB -a NameApp
$ rhc app-restart NameApp
See the mysql cartridge configuration where this is set:
https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-mysql/conf/my.cnf.erb#L39

How do I install and configure RMySQL to connect to a remote MySQL database (AWS RDS)?

The system info relevant to my problem:
AWS RDS DB Instance
Instance Class - db.m1.small
Engine - MySQL 5.6.13
AWS EC2 Linux AMI
https://aws.amazon.com/amazon-linux-ami/2014.03-release-notes/
R version 3.0.2
i686-redhat-linux-gnu (32-bit)
Linux MySQL packages installed:
mysql.noarch 5.5-1.6.amzn1 #amzn-main
mysql-server.noarch 5.5-1.6.amzn1 #amzn-main
mysql55.i686 5.5.37-1.46.amzn1 #amzn-updates
mysql55-common.i686 5.5.37-1.46.amzn1 #amzn-updates
mysql55-libs.i686 5.5.37-1.46.amzn1 #amzn-updates
mysql55-server.i686 5.5.37-1.46.amzn1 #amzn-updates
I have R installed on the aforementioned AWS Linux AMI. I'm trying to pull data from my RDS instance running MySQL into R data frames.
As it stands currently, I have installed the DBI package into R, but installing RMySQL is failing with the following error:
$> R CMD INSTALL RMySQL_0.9-3.tar.gz
* installing to library ‘/usr/lib/R/library’
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking /usr/local/include/mysql/mysql.h usability... no
checking /usr/local/include/mysql/mysql.h presence... no
checking for /usr/local/include/mysql/mysql.h... no
checking /usr/include/mysql/mysql.h usability... no
checking /usr/include/mysql/mysql.h presence... no
checking for /usr/include/mysql/mysql.h... no
checking /usr/local/mysql/include/mysql/mysql.h usability... no
checking /usr/local/mysql/include/mysql/mysql.h presence... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking /opt/include/mysql/mysql.h usability... no
checking /opt/include/mysql/mysql.h presence... no
checking for /opt/include/mysql/mysql.h... no
checking /include/mysql/mysql.h usability... no
checking /include/mysql/mysql.h presence... no
checking for /include/mysql/mysql.h... no
Configuration error:
could not find the MySQL installation include and/or library
directories. Manually specify the location of the MySQL
libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
1. Define and export the 2 shell variables PKG_CPPFLAGS and
PKG_LIBS to include the directory for header files (*.h)
and libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I<MySQL-include-dir>"
export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_<version>.tar.gz
2. Alternatively, you may pass the configure arguments
--with-mysql-dir=<base-dir> (distribution directory)
or
--with-mysql-inc=<base-inc> (where MySQL header files reside)
--with-mysql-lib=<base-lib> (where MySQL libraries reside)
in the call to R INSTALL --configure-args='...'
R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/usr/lib/R/library/RMySQL’
It's clear that I need to direct the installation to where MySQL is installed, but I don't know where to start to locate the proper directory. I did the following to try to look around:
$> find / -name mysql
/usr/share/mysql
/usr/lib/perl5/vendor_perl/auto/DBD/mysql
/usr/lib/perl5/vendor_perl/DBD/mysql
/usr/lib/mysql
/usr/bin/mysql
/var/lib/mysql
/var/lib/mysql/mysql
So there's a lot of different MySQL directories on my AWS Linux instance. Which one do I use in the installation path? Should I do trial and error?
My other question is (assuming I install RMySQL properly), does the MySQL server have to be running on the same physical (virtual?) machine where R is also installed in order for RMySQL to work?
Other research has shown that a SSH tunnel has to be created for the RMySQL connection to the MySQL database to work. Is this true? If I'm not mistaken, AWS RDS doesn't allow for SSH tunneling.
Any other suggestions?
You missed the most important line in the configure output:
checking for mysql.h... no
You have the run-time package(s) for MySQL installed. You now need the development packages.
Under Debian/Ubuntu we impose these Build-Depends (and I just edited away the minimal version requirements):
Build-Depends: debhelper, cdbs, r-base-dev, libmysqlclient-dev, r-cran-dbi
The first two are Debian-packaging internal, the third is R, the fourth is MySQL and you need to map that to whatever RH/FC call it and the last one is DBI for R.