Knowage installation, database error, mysql - mysql

I am trying to install Knowage to my Centos VM in command line and get the following error:
WARNING: please provide a database user that can create schemas. The
following schemas will be created (or overwritten):
knowage_demo
foodmart_demo
JDBC connection failed Database Management System Configuration Use an
already installed DBMS [1, Enter]
Select DBMS for metadata:
MariaDB [1, Enter]
MySQL [2]
2
[jdbc:mysql://localhost:3306]
Username: [root]
Password:
WARNING: please provide a database user that can create schemas.
Any ideas on how to make it working? It keeps getting back to this step.

Related

Python manage.py dumpdata killed prematurely

I'm migrating a database from MySQL to Postgres. This question has been very helpful. When running the python manage.py dumpdata --exclude contenttypes --indent=4 --natural-foreign > everything_else.json to create a json fixture the connection is aborted by the database server. All other steps have been successful.
The MySQL database is hosted on RDS and the connection is aborted at the same point in the file each time I try to run this (file size is always 12288 bytes). Logs from the RDS instance state the problem as follows (db, user and host changed to dummy values):
[Note] Aborted connection 600000 to db: 'mydb' user: 'myUsername' host: '127.0.0.1' (Got an error writing communication packets)
In the terminal the message is simply killed.
Why would this error be happening and how can I create this json fixture?
Update
To test for timeout issues I've followed the advice in this post to change default timeout values. This has no effect on the problem.
I've also tried modifying the DB instance to one with more memory etc. This had no effect.
Further update
I didn't get to the bottom of this but instead took a different route and used AWS database migration service (DMS). There's a good walkthrough for this here. For my small ~5GB database the migration process took 5 minutes with negligible costs on the smallest DMS instance.

After update to MySQL Workbech 8.0.18 no database are shown

Did an update of the MySQL Workbench to version 8.0.18 on Mac OS X Catalina and since then my databases don't show up anymore neither does my website start on localhost because of a connection error.
In the folder: OS X ~/Library/Application\ Support/MySQL/Workbench/ I deleted the wb_options.xml and wb_state.xml files and restarted Workbench but no databases are shown.
Tried to get to a command line where I can enter these commands:
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
mysql -u root -p
mysql> SET GLOBAL innodb_fast_shutdown = 1;
mysql_upgrade -u root -p
Output:
➜ mysql mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 8.0.18 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET GLOBAL innodb_fast_shhutdown = 1;
ERROR 1193 (HY000): Unknown system variable 'innodb_fast_shhutdown'
mysql> SET GLOBAL innodb_fast_shutdown = 1;
Query OK, 0 rows affected (0,00 sec)
mysql> mysql_upgrade -u root -p
No further output.
Had a look at wb.log:
07:45:48 [INF][ Workbench]: Starting up Workbench
07:45:48 [INF][ WBContext UI]: Initializing workbench context UI with these values:
base dir: /Applications/MySQLWorkbench 2.app/Contents/Resources
plugin path: /Applications/MySQLWorkbench 2.app/Contents/PlugIns
struct path: /Applications/MySQLWorkbench 2.app/Contents/Resources/grt
module path: /Applications/MySQLWorkbench 2.app/Contents/PlugIns:/Applications/MySQLWorkbench 2.app/Contents/Resources/plugins
library path: /Applications/MySQLWorkbench 2.app/Contents/Resources/libraries
user data dir: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench
open at start: -psn_0_5371167
open type:
run at startup:
run type:
Force SW rendering: No
Force OpenGL: No
quit when done: No
07:45:48 [INF][ WBContext]: WbContext::init
07:45:48 [INF][ WBA]: Looking for extension modules for WBA...
07:45:48 [INF][ WBA]: 0 extension modules found
07:45:48 [WRN][ grt]: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench/connections.xml:27: link 'D61B9071-5CA5-47E8-AF17-EC4DB12CA9B2' <object GrtObject> key=owner could not be resolved**
07:45:48 [INF][ WBContext]: System info:
MySQL Workbench Community (GPL) for Mac OS X version 8.0.18 CE build 15329599 (64 bit)
Configuration Directory: /Users/<USERNAME>/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench 2.app/Contents/Resources
Cairo Version: 1.10.2 OS: macOS 10.15.x Catalina x86_64 CPU: 8x Intel(R) Core(TM) i7-4870HQ CPU # 2.50GHz - 16.00GiB RAM No video adapter info available
07:45:48 [ERR][ WBContext]: Unknown file type -psn_0_5371167
07:45:59 [ERR][ GRTDispatcher]: exception in grt execute_task, continuing: Exception: Access denied for user 'root'#'localhost' (using password: NO) 07:45:59 [ERR][ GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Access denied for user
'root'#'localhost' (using password: NO) 07:46:06 [ERR][SQL Editor Form]: Can't restore default schema (develop): Unknown database
'develop' 07:46:06 [ERR][SQL Editor Form]: Can't restore default schema (develop): Unknown database 'develop' 07:46:06 [INF][SQL Editor
Form]: Opened connection 'Local instance 3306' to MySQL Community Server - GPL version 8.0.18 07:46:35
[INF][wb_admin_control.py:query_server_installation_info:860]: Currently connected to MySQL server version '8.0.18', conn status = True, active plugins = ['INNODB_INDEXES', 'sha256_password', 'INNODB_CMPMEM_RESET', 'INNODB_BUFFER_POOL_STATS', 'CSV', 'mysql_native_password', 'INNODB_FT_BEING_DELETED', 'INNODB_BUFFER_PAGE', 'INNODB_CMP_PER_INDEX_RESET', 'INNODB_TABLESTATS', 'ARCHIVE', 'INNODB_FT_INDEX_CACHE', 'INNODB_CMP', 'INNODB_FT_CONFIG', 'InnoDB', 'INNODB_FT_DEFAULT_STOPWORD', 'INNODB_TRX', 'binlog', 'INNODB_TABLES', 'INNODB_COLUMNS', 'INNODB_CMPMEM', 'INNODB_FT_INDEX_TABLE', 'sha2_cache_cleaner', 'MEMORY', 'PERFORMANCE_SCHEMA', 'BLACKHOLE', 'caching_sha2_password', 'INNODB_SESSION_TEMP_TABLESPACES', 'INNODB_CACHED_INDEXES',
'TempTable', 'INNODB_VIRTUAL', 'MRG_MYISAM', 'INNODB_CMP_PER_INDEX', 'INNODB_FT_DELETED', 'mysqlx_cache_cleaner', 'INNODB_TABLESPACES',
'INNODB_METRICS', 'mysqlx', 'MyISAM', 'INNODB_TEMP_TABLE_INFO', 'INNODB_CMP_RESET', 'keyring_file', 'ngram', 'INNODB_BUFFER_PAGE_LRU']
07:46:49 [WRN][wb_admin_control.py:exec_query:623]: Error executing query SELECT name, timer_name FROM performance_schema.setup_timers:
07:47:32 [WRN][ mforms]: Resource file not found: mysql-logo-80.png
07:47:33 [WRN][ mforms]: Resource file not found: mysql-logo-80.png
07:53:38 [WRN][ mforms]: Resource file not found: db.StoredProcedure.16x16.png
07:53:38 [WRN][ mforms]: Resource file not found: db.Function.16x16.png
07:53:38 [WRN][ mforms]: Resource file not found: db.Grants.16x16.png
07:54:04 [INF][ Workbench]: Shutting down Workbench
07:54:04 [INF][ Workbench]: Workbench shutdown done ➜ log
Highlighted a line noticing connections.xml could not be resolved. Don't know what the impact is of this notice.
Any help is highly appreciated!
Thank you for your time.
UPDATE 1:
➜ bin mysql_upgrade -u root -p
Enter password:
The mysql_upgrade client is now deprecated. The actions executed by
the upgrade client are now done by the server. To upgrade, please
start the new MySQL binary with the older data directory. Repairing
user tables is done automatically. Restart is not required after
upgrade. The upgrade process automatically starts on running a new
MySQL binary with an older data directory. To avoid accidental
upgrades, please use the --upgrade=NONE option with the MySQL binary.
The option --upgrade=FORCE is also provided to run the server upgrade
sequence on demand. It may be possible that the server upgrade fails
due to a number of reasons. In that case, the upgrade sequence will
run again during the next MySQL server start. If the server upgrade
fails repeatedly, the server can be started with the --upgrade=MINIMAL
option to start the server without executing the upgrade sequence,
thus allowing users to manually rectify the problem. ➜ bin
UPDATE 2
Tried to connect to the database via the commandline, and my best guess is that my databases are gone :(
➜ bin echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
➜ bin . ~/.bash_profile
➜ bin mysql -u root -p -h 127.0.0.1 develop
Enter password:
ERROR 1049 (42000): Unknown database 'develop'
Is there by any change a possibility to check if the database 'develop' really is gone? If so, is it possible to recover it with TimeMachine?
I don't know what happend, but upgrading the Workbench has become a nightmare to me.
The warning you highlighted is about a deserialization problem for a file and is nothing serious.
You real problem is that you cannot connect. You passed a parameter to Workbench 07:45:48 [ERR][ WBContext]: Unknown file type -psn_0_5371167 which it tries to interpret as connection name. See also the context initialization values at the top of the log file. There's an entry open at start: -psn_0_5371167 which confirms what I mention above. Try launching Workbench without any parameter.
According to this question the PSN parameter is a process serial number, which is passed to a GUI app only on first start. Did you ever try another start of Workbench since you downloaded it?
Side note: Workbench really should be aware of such a parameter and ignore it.

MySQL can show tables but cannot access data (errno: 13 - Permission denied)

I am fixing a server that uses Bitnami to run a WordPress site. I did not set up the server – it ran out of memory and crashed.
I was able to restart MySQL through the bitnami ctlscript, and I am able to access the MySQL CLI, but I cannot execute any queries that return data INSIDE the tables.
The following commands all work, and generate the expected output:
show databases;
use database 'x';
show tables;
As soon as I try to view table data (SELECT * FROM ...), this error shows up:
2019-01-15T18:25:19.507808Z 233 [ERROR] /opt/bitnami/mysql/bin/mysqld.bin: Can't find file: './bitnami_wordpress/wp_options.frm' (errno: 13 - Permission denied)
What I've tried:
Database file permissions. All data (specifically the
wp_tablename.frm files) is chowned by mysql:mysql
I confirmed this by changing permissions to my server user, restarting and trying to access mysql again, but the commands above, which already worked, broke, so I changed it back.
Reboots of all sorts. Bitnami, server, etc.
Selinux. I am 95% sure it is not running on this server (all commands
that check its status / install info return 'use apt-get to
install this package) or something like that.
Please help! This site is in production!

Unable to start mysql in redmine

Hi I'm unable to start my mysql and subversion using root as user.When im trying to start it by ./ctlscript.sh start mysql it is showing that mysql could not be started.The same is happening in the case of subversion also.In logs its showing that
error: Can't connect to local MySQL server through socket '/data/redmine/mysql/tmp/mysql.sock' (2) (Mysql2::Error)
error: [ pid=6349 thr=139977144923904 file=ext/common/agents/HelperAgent/RequestHandler.h:1731 time=2014-09-29 12:54:58.7821 ]: [Client 23] Cannot checkout session. An error occured while starting up the preloader.
Can any one help?
Please check whether your root user has the permission to start the mysql and other services.
If not please give the permissions using CHMOD

Creating RDS database failed Reason: Cannot upgrade mysql

I'm following the instruction here to deploy my ruby on rails app on elastic beanstalks
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html
But I got following error when creating RDS database:
2014-04-19 18:35:49 INFO Creating RDS database named: aa8njgjixa22x5. This may take a few minutes.
2014-04-19 18:45:17 ERROR Creating RDS database: aa8njgjixa22x5 failed Reason: Cannot upgrade mysql from 5.6.13 to 5.5.33
2014-04-19 18:45:36 ERROR Stack named 'awseb-e-qzjpemepuc-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBRDSDatabase].
2014-04-19 18:45:39 INFO Launched environment: drinkchatbackend-master. However, there were issues during launch. See event log for details.
Description :
2014-04-19 18:45:36 ERROR Stack named 'awseb-e-qzjpemepuc-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBRDSDatabase].
2014-04-19 18:45:17 ERROR Creating RDS database: aa8njgjixa22x5 failed Reason: Cannot upgrade mysql from 5.6.13 to 5.5.33
Running "eb status --verbose" shows below
RDS Database: AWSEBRDSDatabase | aa8njgjixa22x5.cuokqzbpcqzr.us-west-1.rds.amazonaws.com:3306
Database Engine: mysql 5.6.13
Allocated Storage: 5
Instance Class: db.t1.micro
Multi AZ: False
Master Username: drinkchat
Creation Time: 2014-04-19 18:40:43
DB Instance Status: available
My .elasticbeanstalk/optionsettings080 config does not specifying 5.5.x
[aws:rds:dbinstance]
DBDeletionPolicy=Snapshot
DBEngine=mysql
DBInstanceClass=db.t1.micro
DBSnapshotIdentifier=drinkchatstaging-final-snapshot
DBUser=ebroot
Questions I have:
why it is trying to update to mysql 5.5.33?
how can I proceed investigation? I don;t see the application in
https://console.aws.amazon.com
I can't find the DB instance in the Amazon RDS console.
The work around I used was to not use elastic beanstalk's RDS configuration. instead just launch RDS manually and connect through my app.