I got error while installing redmine on ubuntu 14.04. I don't understand why I get this error.
Below is are stack I get
apt-get install redmine redmine-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
redmine is already the newest version.
redmine-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up redmine (2.4.2-1) ...
dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/defaul
t.conf
Creating config file /etc/redmine/default/database.yml.new with new version
granting access to database redmine_default for redmine_default#localhost: alrea
dy exists.
creating database redmine_default: already exists.
dbconfig-common: flushing administrative password
Replacing config file /etc/redmine/default/session.yml with new version
A new secret session key has been generated in /etc/redmine/default/session.yml
Populating database for redmine instance "default".
This may take a while.
rake aborted!
Server is running in --secure-auth mode, but 'redmine_default'#'localhost' has a
password in the old format; please change the password to the new format
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `connect'
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `initialize'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
dpkg: error processing package redmine (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)
Errors were encountered while processing: redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)`
Following is output of command dpkg -l redmine
`Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
iF redmine 2.4.2-1 all flexible project management web a`
Rails version install on my machine
rails -v
Rails 4.1.4
Ruby version install on my machine
ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
apache2 version
`apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built: Apr 3 2014 12:20:28`
I am new to ubuntu and also linux. Can anyone identify why I get this error ?
The problem is the way the password is being passed to the MySQL server.
You can set secure_auth: true in the database.yml file right under where the password is specified to use the appropriate format.
Alternatively, you could disable secure auth in the mysql daemon config and restart.
Related
We have a peculiar situation. I have inherited some source code from the people who left the company.
in docker file they are installing the mysql driver via
apt-get install -y python3-pip sshpass python-mysqldb
and the container is running successfully, recentlhy after we upgraded mysql verskion to 8.x. we starred getting exception
Exception message: (2026, 'SSL connection error: unknown error number')
I tried to upgrade the python-msql
apt-get upgrade python-mysql
I always get the message
root#ad27eb3de17d:~# apt upgrade python-mysqldb
Reading package lists... Done
Building dependency tree
Reading state information... Done
**python-mysqldb is already the newest version (1.3.7-1build2).**
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
wget
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
but we are still getting the same error message. please help what component do I need to upgrade?
we are using
root#ad27eb3de17d:~# python3 --version
Python 3.5.2
``
I deleted the file oracle-java11-installer-local but i messed my system up. I now cant install mySQL and it is giving errors
here is what happens... Image
~ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (8.0.21-1ubuntu18.04).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up oracle-java11-installer-local (11.0.8-1~linuxuprising0) ...
Before installing this package,
please download the Oracle JDK 11 .tar.gz file
with the same version as this package (version 11.0.4),
and place it in /var/cache/oracle-jdk11-installer-local,
E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.8_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
installed oracle-java11-installer-local package post-installation script subpro
cess returned error exit status 1
Errors were encountered while processing:
oracle-java11-installer-local
E: Sub-process /usr/bin/dpkg returned an error code (1)
The screen shot says following things --
mysql 8 is already installed.
Please check the output of the following command
ps aux | grep mysql
Trying to install java 11 and reached the error in package repository.
I am running tests on Codebuild using Docker. I am using MySQL 5.7 community server using mysql docker image. In my dockerfile, I am using following apt-get update command to get default-mysql-client.
RUN apt-get install -qq -y build-essential locales nodejs software-properties-common ffmpeg pngquant procps vim default-mysql-client mycli tig httpie > /dev/null
But when migrations run and about to finish it raises error and terminates
mysqldump: Couldn't execute 'SHOW PACKAGE STATUS WHERE Db = 'development'': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PACKAGE STATUS WHERE Db = 'development'' at line 1 (1064)
rake aborted!
failed to execute: `mysqldump`
Please check the output above for any errors and make sure that `mysqldump` is installed in your PATH and has proper permissions.
It was working fine previously and just started since yesterday on Codebuild. Can anybody help regarding this ?
I think Codebuild has migrated to buster debian build and now
default-mysql-client is fetching mariadb-client-10.3 instead of mariadb-client-10.1 and due to that this issue is getting raised.
Moreover, I have tried explicitly replacing default-mysql-client with mariadb-client-10.1 but codebuild fails to find the package and that makes sense since mariadb-client-10.1 is not available for buster.
I need to archive my MySQL-database every year and I found the Percona Toolkit. But I want to try it on XAMPP first and not on the actual server. I used the Shell from the XAMPP Control Panel.
First, I installed pt-archiver with the command:
wget percona.com/get/pt-archiver --no-check-certificate
The installation was successful. I tried my first dry run:
pt-archiver --source h=127.0.0.1,D=db_ilb,t=erstbegegnung --file 'C:\xampp\Archive\%Y-%m-%d-%D.%t' --where "1=1" --limit 1000 --commit-each --dry-run
and it threw an error:
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 14) line 3.
at ./pt-archiver line 2499.
After trying to install DBD::mysql via CSPAN, another error was thrown:
Warning: No success on command[C:\xampp\perl\bin\perl.exe Makefile.PL]
CPAN: YAML::XS loaded ok (v0.39)
MICHIELB/DBD-mysql-4.041.tar.gz
C:\xampp\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Stopping: 'install' failed for 'DBD::mysql'.
Could not read metadata file. Falling back to other methods to determine prerequisites
I don't know what to do next... If you have any other suggestions for archiving, let me know :)
I have Ubuntu 16.04 running (clean install - no upgrade). MySQL is running fine - but I get this error when I try to update MySQL:
apt-get install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.16-0ubuntu0.16.04.1) ...
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
The sys schema is already up to date (version 1.5.1).
Checking databases.
ALL DATABASES RETURNED OK
Error occurred: Error during call to mysql_check.
mysql_upgrade failed with exit status 4
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Although it's running, I dont like errors. Do you guys have any idea how to fix this issue?
Running dpkg -l | grep mysql gives:
dpkg -l | grep mysql
ii libdbd-mysql-perl 4.033-1ubuntu0.1 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient20:amd64 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database client library
ii mysql-client 5.7.16-0ubuntu0.16.04.1 all MySQL database client (metapackage depending on the latest version)
ii mysql-client-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database client binaries
ii mysql-client-core-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database core client binaries
ii mysql-common 5.7.16-0ubuntu0.16.04.1 all MySQL database common files, e.g. /etc/mysql/my.cnf
iU mysql-server 5.7.16-0ubuntu0.16.04.1 all MySQL database server (metapackage depending on the latest version)
iF mysql-server-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database server binaries and system database setup
ii mysql-server-core-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database server binaries
ii php-mysql 1:7.0+45+deb.sury.org~xenial+1 all MySQL module for PHP [default]
ii php5.6-mysql 5.6.27-1+deb.sury.org~xenial+1 amd64 MySQL module for PHP
ii php7.0-mysql 7.0.12-1+deb.sury.org~xenial+1 amd64 MySQL module for PHP
Thanks
I've run into this myself and I believe it has to do with how the upgrade process stops/starts/restarts MySQL.
Here is my workaround that I do after an attempted upgrade of MySQL fails.
Start MySQL normally, typically "service mysql start" as root.
As root execute "mysql_upgrade --defaults-file=/etc/mysql/debian.cnf". Hopefully it should complete with no errors or indicate that MySQL is already upgraded.
Edit the file "/var/lib/dpkg/info/mysql-server-5.7.postinst" with your favorite editor. Around line 320 (depending on version) find the line "mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?". Comment that line out (prepend line with '#'), if should look like "#mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?". Save the file and exit from the editor.
Rerun the upgrade process and it should indicate that MySQL is now upgraded.
At some point I will dig further to see why the "mysql_upgrade ..." invocation fails during the upgrade but not alone from the command line. But I've not gone through a few iterations of upgrades without issue using this method.
Hope this helps.
'Grip
I've had this issue before, the root cause for this issue was changing the db configuration.
I changed lower_case_table_names = 1 and set the value to one, and when I tried to upgrade it failed with the error you shared in your question.
To solve it, I simple set the value back to 0, restarted the db, and the upgrade worked well for me.
First edit the config:
sudo nano /etc/mysql/my.cnf
change this line:
lower_case_table_names = 0
restart the database
sudo /etc/init.d/mysql restart
Then run the upgrade command
NOTE: This is for upgrading MySQL with "mysql_secure_installation" fix.
Had problems with upgrading MySQL Server 5.7 in Ubuntu 16.04 and I finally located my problem. I enabled "mysql_secure_installation" during my first installation that causes the upgrade script to fail due to password creation error (unsatisfied special character requirement on the automatically generated password in the upgrade script).
While running 'sudo apt upgrade' or 'sudo apt install -f', the error can be traced using this command:
tail -f /var/log/mysql/error.log
In my case, the log shows:
[ERROR] 1819 Your password does not satisfy the current policy
requirements
To fix this, login to mysql and temporarily disable MySQL's validate password plugin:
mysql -u root -p -h 127.0.0.1
mysql> uninstall plugin validate_password;
mysql> exit
make sure to stop the previous upgrade/install and rerun the upgrade/install. Once done, login back to mysql and enable MySQL's validate password plugin;
mysql -u root -p -h 127.0.0.1
mysql> install plugin validate_password SONAME 'validate_password.so';
mysql> exit
always check /var/log/mysqld.log first