Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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)
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).
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.
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
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'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.