Mysql dead after update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| mysql-dfsg-5.0 (Ubuntu) |
High
|
Mathias Gug | ||
| mysql-dfsg-5.1 (Ubuntu) |
High
|
komena |
Bug Description
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.1 (5.1.30-2ubuntu2) ...
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 1
Package: mysql-server-5.1 5.1.30-2ubuntu2
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.30-2ubuntu2 failed to install/upgrade: subprocess post-installation script returned error exit status 1
Uname: Linux 2.6.28-4-generic x86_64
Arenlor (arenlor) wrote : | #1 |
Changed in mysql-dfsg-5.1: | |
status: | New → Confirmed |
problem for me seems to lie in mysql_upgrade, ie.
# less /var/lib/
090114 15:19:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
090114 15:19:39 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090114 15:19:39 InnoDB: Started; log sequence number 0 46409
090114 15:19:39 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
090114 15:19:39 mysqld_safe mysqld from pid file /var/run/
but cant successfully run upgrade since cant start mysql server
# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck'...
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/
FATAL ERROR: Upgrade failed
Arenlor (arenlor) wrote : | #4 |
Even after update to ubuntu3 it still doesn't work.
jyio (inportb) wrote : | #5 |
Aww darn... I have run into this issue as well on the Jaunty Jackalope. I'll post if I find anything useful in the future.
Arenlor (arenlor) wrote : | #6 |
Can we get someone to at least set the importance, as MySQL does not work, so I'd guess it'd be a blocking level bug?
Niels Egberts (nielsegberts) wrote : | #7 |
Agreed, amarok depends on mysql so that one also does not want to work.
jyio (inportb) wrote : | #8 |
Ah, right. I guess I'll try to get Amarok to use SQLite in the interim, but I heard it's slow...
Mathias Gug (mathiaz) wrote : | #9 |
Dinxter: did you upgrade from mysql-dfsg-5.0?
Others: you're probably running into the issue reported in bug 316849.
Changed in mysql-dfsg-5.1: | |
status: | Confirmed → Incomplete |
i didnt have 5.0 installed but had tables left over from that version when installing 5.1. i'm not sure what 5.0 version the tables were from though, i think it was probably the one on intrepid release. when 5.1 didnt complete postinst properly i tried purging 5.1, installing jaunty's 5.0 and upgrading to 5.1 but this didnt help. my post above was from this stage. i ended up purging the old tables and reinstalling 5.1 with no problems. i havent managed to recreate the problem installing 5.0 from jaunty, creating a few tables and upgrading to 5.1
cant seem to recreate the problem by upgrading from intrepid mysql-server-
Matteo Settenvini (tchernobog) wrote : | #12 |
@Mathias: thanks, bug 316849 was the one for me. Now at least it's working.
Alfredo Deza (arufuredosan) wrote : | #13 |
Hi,
I had the same problems when installing Mysql-server-5.1 and had to uncomment the line to skip-bdb.
Now to upgrade, I was getting the same errors as people in this thread.
The current problem was fixed for me doing the following:
sudo apt-get remove --purge mysql-server-5.1
sudo apt-get autoremove
sudo rm -rf /etc/mysql
sudo apt-get install mysql-server-5.1
At this point Mysql will complain that it can't read /etc/mysql/my.cnf but this is triggered because it no longer installs the configuration file named as my.cnf but as debian.cnf (Would this need be reported as another bug?)
After it complains do:
sudo cp -a /etc/mysql/
Now once again:
sudo apt-get install mysql-server-5.1
This corrected everything for me and now I have mysql installed and working.
lann (lann) wrote : | #14 |
Hi
yes it's OK for me too
Matteo Settenvini (tchernobog) wrote : | #15 |
Broken again for me with mysql-server-5.1 version 5.1.30-2ubuntu4; fails upong trying to start the service. It was okay in the version before this by following directions as per bug 316849, so that's not the case anymore.
ChangeLog says:
mysql-dfsg-5.1 (5.1.30-2ubuntu4) jaunty; urgency=low
[ Jonathan Riddell ]
* Move data files to /usr/share/
--datadir=
* Update debian/rules for the above change
* Split out /usr/share/
These files are needed for embedded use of mysql (e.g. by Amarok).
* Make mysql-server-5.1 conflict on mysql-server-
[ Harald Sitter ]
* Update all remaining references of usr/share/mysql/
* Conflicts for the Kubuntu Intrepid deployment (subject for upgrade testing):
+ libmysqlclient16 replaces & conflicts amarok-
+ libmysqlclient1
+ mysql-data-5.1 replaces & conflicts amarok-mysql-data
* Link /usr/share/
-- Harald Sitter <email address hidden> Tue, 20 Jan 2009 15:43:46 +0100
By the way, starting "mysqld" by hand via console, brings up the following error:
090128 22:23:38 [ERROR] Can't find messagefile '/usr/share/
In fact, that file is now in '/usr/share/
The complete output to the console is:
matteo@
090128 22:29:20 [ERROR] Can't find messagefile '/usr/share/
090128 22:29:21 InnoDB: Started; log sequence number 0 36380721
090128 22:29:21 [ERROR] Aborting
090128 22:29:21 InnoDB: Starting shutdown...
090128 22:29:22 InnoDB: Shutdown completed; log sequence number 0 36380721
090128 22:29:22 [Note]
Finally, running sudo /etc/mysql/
Checking for corrupt, not cleanly closed and upgrade needing tables.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
On Wed, Jan 28, 2009 at 09:31:48PM -0000, Matteo Settenvini wrote:
> By the way, starting "mysqld" by hand via console, brings up the following error:
> 090128 22:23:38 [ERROR] Can't find messagefile '/usr/share/
>
> In fact, that file is now in
> '/usr/share/
> should fix it.
This is a setting set in /etc/mysql/my.cnf. You should be able to update
the language option in the file to point to
/usr/share/
status confirmed
importance high
--
Mathias Gug
Ubuntu Developer http://
Changed in mysql-dfsg-5.1: | |
importance: | Undecided → High |
status: | Incomplete → Confirmed |
Mathias Gug (mathiaz) wrote : | #17 |
The fix is to remove the language option in /etc/mysq/my.cnf. The file is part of of mysql-common from the mysql-dfsg-5.0 source package.
Changed in mysql-dfsg-5.0: | |
assignee: | nobody → mathiaz |
importance: | Undecided → High |
status: | New → In Progress |
Changed in mysql-dfsg-5.1: | |
status: | Confirmed → Invalid |
Launchpad Janitor (janitor) wrote : | #18 |
This bug was fixed in the package mysql-dfsg-5.0 - 5.1.30really5.
---------------
mysql-dfsg-5.0 (5.1.30really5.
* debian/
located in a different directory in MySQL 5.1. Setting the language option
to use /usr/share/mysql/ breaks 5.1. Both 5.0 and 5.1 use a default value
that works. (LP: #316974).
-- Mathias Gug <email address hidden> Thu, 29 Jan 2009 16:01:31 -0500
Changed in mysql-dfsg-5.0: | |
status: | In Progress → Fix Released |
Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package mysql-dfsg-5.1 - 5.1.34-1ubuntu1
---------------
mysql-dfsg-5.1 (5.1.34-1ubuntu1) karmic; urgency=low
* Merge from debian experimental (and 5.0 from main), remaining changes:
- debian/
+ ask for MySQL root password at priority high instead of medium so
that the password prompt is seen on a default install. (LP: #319843)
+ don't ask for root password when upgrading from a 5.0 install.
- debian/control:
+ Make libmysqlclient1
+ Make libmysqlclient-dev conflict with libmysqlclient1
+ Don't build mysql-server, mysql-client, mysql-common and
by mysql-dfsg-5.0.
+ Make mysql-{
replace mysql-{
+ Depend on a specific version of mysql-common rather than the src
version of mysql-dfsg-5.1 since mysql-common is currently part of
+ Lower mailx from a Recommends to a Suggests to avoid pulling in
a full MTA on all installs of mysql-server. (LP: #259477)
- debian/rules:
+ added -fno-strict-
build failures.
+ install mysql-test and sql-bench to /usr/share/mysql/ rather than
/usr/.
- debian/
- Add AppArmor profile:
- debian/
- debian/rules, debian/
- debian/
- debian/
purge.
- debian/
- debian/
- debian/
- debian/
located in a different directory in MySQL 5.0. Setting the language
option to use /usr/share/
use a default value that works. (LP: #316974)
- debian/
+ Clearly indicate that we do not support running multiple instances
of mysqld by duplicating the init script.
(closes: #314785, #324834, #435165, #444216)
+ Properly parameterize all existing references to the mysql config
file (/etc/mysql/
- debian/
when setting up mysql. (LP: #344816)
- mysql-server-
+ debian/control: create mysql-server-
+ debian/
move core mysqld files to mysql-server-
- Don't package sql-bench and mysql-test file.
* Dropped changes:
- debian/
Changed in mysql-dfsg-5.1 (Ubuntu): | |
status: | Invalid → Fix Released |
Mathias Gug (mathiaz) wrote : | #20 |
Reopening for 5.1 - the mentioned bug number in the changelog is wrong.
Changed in mysql-dfsg-5.1 (Ubuntu): | |
status: | Fix Released → Triaged |
status: | Triaged → Fix Released |
Mathias Gug (mathiaz) wrote : | #21 |
Actually it's the correct bug. Marking Fix released again for 5.1.
ekinsokmen (ekin-sokmen) wrote : | #22 |
The problem seems to be caused by some permission issue on mysql binary log files. After the upgrade mysql failed to start. Trying to start mysql service manually (service start mysql) also failed with following error:
100215 13:58:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100215 13:58:01 [Note] Plugin 'FEDERATED' is disabled.
100215 13:58:02 InnoDB: Started; log sequence number 0 698955389
^G/usr/sbin/mysqld: File './ekins-
100215 13:58:02 [ERROR] Failed to open log (file './ekins-
100215 13:58:02 [ERROR] Could not open log file
100215 13:58:02 [ERROR] Can't init tc log
100215 13:58:02 [ERROR] Aborting
in /var/lib/mysql directory these two files have root permission instead of mysql.
-rw-rw---- 1 root root 586 2010-02-15 14:08 ekins-bin.000069
-rw-rw---- 1 root root 712394 2010-02-15 14:08 ekins-bin.000070
After running "chown mysql:mysql /var/lib/mysql/*" I can start mysql manually running "service start mysql" and it works. But if I trigger dpkg to configure the failed packages mysql-server and mysql-server-5.1 same error occurs and permissions of last created bin files are set to "root" user again.
David Park (dparkmit) wrote : | #23 |
Hi All,
I was wondering if a fix for this bug has been released? The status indicates that a fix has been released. But I'm not sure how to get it. I'm experiencing the same problem that @ekinsokmen reported. Any advice on how to get the fix would be greatly appreciated!
David
Gurgel (sven-ola-eriksson) wrote : | #24 |
This just worked for me on a 64-bit Ubuntu 11.10 Desktop machine, when in Kernel.log and the syslog having:
init: mysql main process (15527) terminated with status 1
init: mysql main process ended, respawning
init: mysql post-start process (15528) terminated with status 1
Another symptom is that the mysqld keeps disappearing an reappearing among the processes in in the system monitor.
I guess that is the same that is stated in the files above.
If you decide to try workaround, make sure to make a backup of db-files.
Workaround:
>sudo apt-get remove --purge mysql-server-5.1
>sudo apt-get autoremove
>sudo rm -rf /etc/mysql
>sudo apt-get install mysql-server-5.1
I also choose to set a new root password for mysql.
Then I also did:
>sudo apt-get install mysql-admin
Well... This got the server running and Admin GUI to work for me.
I was able to log in as root.
Now lets see if I get the backup-ed data into mysql again ;)
Changed in mysql-dfsg-5.1 (Ubuntu): | |
assignee: | nobody → komena (azizcom-komena) |
Seems to fail due to lack of '/var/run/ mysqld/ mysqld. sock'. creating this file doesnt help as it is removed somewhere as part of the init startup
Jan 14 12:38:50 crystaltree /etc/init. d/mysql[ 12424]: 0 processes alive and '/usr/bin/ mysqladmin --defaults- file=/etc/ mysql/debian. cnf ping' resulted in d/mysql[ 12424]: ^G/usr/ bin/mysqladmin: connect to server at 'localhost' failed d/mysql[ 12424]: error: 'Can't connect to local MySQL server through socket '/var/run/ mysqld/ mysqld. sock' (2)' d/mysql[ 12424]: Check that mysqld is running and that the socket: '/var/run/ mysqld/ mysqld. sock' exists! d/mysql[ 12424]:
Jan 14 12:38:50 crystaltree /etc/init.
Jan 14 12:38:50 crystaltree /etc/init.
Jan 14 12:38:50 crystaltree /etc/init.
Jan 14 12:38:50 crystaltree /etc/init.