LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-13-2008, 02:45 AM   #1
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Rep: Reputation: 15
mysql failed to start. reinstall failed either!!!


some days ago, mysql crashed for some unknown reasons. So i reinstalled it then.

still, i find out that, mysql could not be started till now.
Once i attempt to start mysql and finally fails, i find this log in /var/log/syslog file:
Quote:
Aug 13 15:25:08 tp05ftp /etc/init.d/mysql[17845]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Aug 13 15:25:08 tp05ftp /etc/init.d/mysql[17845]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Aug 13 15:25:08 tp05ftp /etc/init.d/mysql[17845]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Aug 13 15:25:08 tp05ftp /etc/init.d/mysql[17845]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
and when i dpkg my box, it reads like this:

Quote:
$ dpkg -l | grep -v ^ii
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ name dist sum
+++-=====================================-===========================-=================
iU mysql-server 5.0.51a-3ubuntu5.1 MySQL database se
iF mysql-server-5.0 5.0.51a-3ubuntu5.1 MySQL database se
it seems that something went wrong, when i reinstall it.

please help. how can i fix it? my box is running ubuntu 8.04 server.

thanks in advance.

Last edited by gavin2u; 08-13-2008 at 02:46 AM.
 
Old 08-13-2008, 09:04 AM   #2
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
after i removed all mysql-server and mysql-server-5.0 packages, it failed again when i attempted to install mysql server
Quote:
sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.0
Suggested packages:
mysql-doc-5.0 tinyca
Recommended packages:
apparmor libhtml-template-perl mailx
The following NEW packages will be installed:
mysql-server mysql-server-5.0
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 53.7kB/27.5MB of archives.
After this operation, 86.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com hardy-updates/main mysql-server 5.0.51a-3ubuntu5.1 [53.7k
Fetched 53.7kB in 2s (21.5kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-server-5.0.
(Reading database ... 40454 files and directories currently installed.)
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb) ...
Your account has expired; please contact your system administrator
chfn: PAM authentication failed
adduser: `/usr/bin/chfn -f MySQL Server mysql' returned error code 1. Exiting.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.51a-3ubuntu5.1_all.deb) ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
any tips?
 
Old 08-13-2008, 07:02 PM   #3
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
any idea please?

thanks again.
 
Old 08-13-2008, 07:09 PM   #4
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Rep: Reputation: 32
Quote:
Originally Posted by gavin2u View Post
any idea please?

thanks again.
i had the same problem ..
.......
i just uninstalled it and issue the commands to install it again .

yum install mysqld mysql-server


and it worked fine .
 
Old 08-13-2008, 08:24 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
Your account has expired; please contact your system administrator
I'd start by checking what caused that msg.
 
Old 08-14-2008, 03:25 AM   #6
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chrism01 View Post
I'd start by checking what caused that msg.
i see that message from the command line.

and i deleted mysql group and user.

and then i reinstall mysql-server.

it display the same message. Failed again.
 
Old 08-21-2008, 03:30 AM   #7
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
when i remove(--purge) mysql-server mysql-server-5.0 mysql-common
and also del mysql user and mysql group.

finally, i reinstall mysql. but, error again:
Quote:
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmysqlclient15off mysql-client-5.0 mysql-common mysql-server-5.0
Suggested packages:
mysql-doc-5.0 tinyca
Recommended packages:
apparmor libhtml-template-perl mailx
The following NEW packages will be installed:
libdbd-mysql-perl libmysqlclient15-dev libmysqlclient15off mysql-client mysql-client-5.0
mysql-common mysql-server mysql-server-5.0
0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/44.6MB of archives.
After this operation, 130MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package mysql-common.
(Reading database ... 40139 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.0.51a-3ubuntu5.1_all.deb) ...
Selecting previously deselected package libmysqlclient15off.
Unpacking libmysqlclient15off (from .../libmysqlclient15off_5.0.51a-3ubuntu5.1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.005-1_i386.deb) ...
Selecting previously deselected package mysql-client-5.0.
Unpacking mysql-client-5.0 (from .../mysql-client-5.0_5.0.51a-3ubuntu5.1_i386.deb) ...
Setting up mysql-common (5.0.51a-3ubuntu5.1) ...
(Reading database ... 40240 files and directories currently installed.)
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb) ...
Your account has expired; please contact your system administrator
chfn: PAM authentication failed
adduser: `/usr/bin/chfn -f MySQL Server mysql' returned error code 1. Exiting.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package libmysqlclient15-dev.
Unpacking libmysqlclient15-dev (from .../libmysqlclient15-dev_5.0.51a-3ubuntu5.1_i386.deb) ...
Selecting previously deselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_5.0.51a-3ubuntu5.1_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.0.51a-3ubuntu5.1_all.deb) ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Your account has expired; please contact your system administrator
!!! which account has expired? (i have mysql user and group been deleted already).

help, please.

Last edited by gavin2u; 08-21-2008 at 03:52 AM.
 
Old 08-21-2008, 04:36 AM   #8
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
i find these msg in /var/log/auth.log
Quote:
Aug 21 16:59:09 tp05ftp chage[11549]: changed password expiry for mysql
Aug 21 16:59:09 tp05ftp chfn[11550]: pam_unix(chfn:account): account root has expired (account expired)
Aug 21 17:00:01 tp05ftp CRON[11717]: pam_unix(cron:account): account root has expired (account expired)
Aug 21 17:09:01 tp05ftp CRON[14081]: pam_unix(cron:account): account root has expired (account expired)
Aug 21 17:30:05 tp05ftp CRON[18367]: pam_unix(cron:account): account root has expired (account expired)
my root account has expired?
 
Old 08-21-2008, 08:11 AM   #9
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
using the following cmd, i fixed the problem above, and sucessfully installed mysql
Quote:
sudo chage -E never root
Quote:
sudo apt-get install mysql-server
however, the last step of the mysql installation, the following tips appears on the screen:
Quote:
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
how can i fix it?

thanks in advance.
 
Old 08-21-2008, 08:45 AM   #10
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
when checking mysql databases, i got the msg below:
Quote:
sudo mysqlcheck -u root -p --repair --all-databases
Enter password:
mysql.columns_priv OK
mysql.db OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.proc OK
mysql.procs_priv 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
 
Old 11-13-2008, 10:07 PM   #11
apokluda
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 1
Thanks for the help

Hey - I don't know why, but I had the same problem when setting up mysql on my VPS server. Maybe this has to do with the way the VPS was set up... it was set up for me with only one user account, the root account, and then I changed things back to the Ubuntu way using 'sudo'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL failed to start in XAMPP bhatmahesht Linux - Software 7 07-23-2008 05:48 PM
mysql failed to start nawuza Linux - Newbie 4 07-23-2008 11:13 AM
Failed to start MySQL satimis Linux - Server 2 12-21-2006 05:41 AM
mysql start....FAILED GreenAcres Linux - Newbie 7 08-25-2006 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration