I have a linux server:
Distributor ID: Debian Description: Debian GNU/Linux 5.0.10 (lenny) Release: 5.0.10 Codename: lenny
Lately, the MySQL server was a litte bit slow when trying to establish a connection to the databases, so I tried to restart the service with
service mysql restart since then 2 things happened:
- The service stops and refuses to be restarted once again
- It displays an error:
Once I try service mysql (start or restart or even stop)
error:tail: invalid option -- n Try `tail --help' for more information. tail: invalid option -- n Try `tail --help' for more information.
mysql start gives:
ERROR 2002 Can't connect to local Mysql server through socket /var/run/mysqld/mysqld.sock (2)
But this file doesn't exist in any way in this directory. I though that maybe this file is located somewhere else in my server and the
my.cnf just contains the wrong path and this is why the call fails. I tried to find the right path for the file:
mysqld.sock and edit the required line in
my.cnf file, but with find command I figure out there is no such a file
mysql.sock in all the server directories.
In a next step I tried to re-install the MySQL server from scratch, what happened is that the old MySQL version and also Apache was successfully removed and the process for the installation was broken and failed to continue.
php -v shows the next output:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysql.so' - /usr/lib/php5/20060613/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/mysqli.so' - /usr/lib/php5/20060613/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/pdo_mysql.so' - /usr/lib/php5/20060613/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 5.2.6-1+lenny16 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 3 2012 08:19:55) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube Ltd.
What I am trying to do now:
I made a backup for my websites located under
/var/www/vhosts and I want to upgrade the system to Wheezy 7.0 Then to install Apache and MySQL what can I do in such a case, I don't even know if I still have my databases or they are already lost.
What steps are required to fix that?
Have to reconfigure after that the virtual host to enable my websites once again.
I am lost any help?
To install mysql on debian Lenny I tried this:
aptitude -t lenny-backports install mysql-server-5.1 mysql-client-5.1 mysql-common
During the installation it displays that a connecxion test was faild, in the error log file:
mysql: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory