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.
I installed mysql-server on Debian 6.0.7 using apt-get install mysql-server command. Then, I go into some problems and removed it with apt-get remove mysql-server. No problem till then.
Then while trying to delete some files, I accidentally deleted /etc/mysql/ directory. No big deal since I no longer have mysql-server installed, right?
Wrong, now that I'm trying to re-install mysql-server, it came back with error message saying ...
Quote:
Stopping MySQL database server: mysqld.
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz ... (warning).
-bash: syntax error near unexpected token `('
compunuts@supra:~$ Starting MySQL database server: mysqld ..
-bash: Starting: command not found
compunuts@supra:~$ /etc/init.d/mysql: line 120: /etc/mysql/debian-start: No suc file or directory
-bash: /etc/init.d/mysql:: No such file or directory
compunuts@supra:~$ invoke-rc.d: initscript mysql, action "start" failed.
-bash: invoke-rc.d:: command not found
Anybody can point me to
a) How to completely remove and reinstall mysql-server
b) or how to remedy this problem I have.
Thanks for your help so far. I really appreciated.
I did what you suggested and created files that the process asked. It all returned error code 1. And I created the files and re-do the uninstall/reinstall. When I tried to purge it, it came back saying
Quote:
compunuts@supra:/etc/mysql$ sudo aptitude purge mysql-server
The following partially installed packages will be configured:
mysql-server-5.1
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up mysql-server-5.1 (5.1.66-0+squeeze1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
mysql-server-5.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mysql-server-5.1 (5.1.66-0+squeeze1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.1
And then I tried to re-installing it.
Quote:
compunuts@supra:/etc/mysql$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
mysql-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/71.8 kB of archives.
After this operation, 106 kB of additional disk space will be used.
Selecting previously deselected package mysql-server.
(Reading database ... 46297 files and directories currently installed.)
Unpacking mysql-server (from .../mysql-server_5.1.66-0+squeeze1_all.deb) ...
Setting up mysql-server-5.1 (5.1.66-0+squeeze1) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--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.1; however:
Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
configured to not write apport reports
configured to not write apport reports
Errors were encountered while processing:
mysql-server-5.1
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
compunuts@supra:/etc/mysql$
Anymore suggestions?? At this point, I'm going to look for how to remove packages with crappy residues even when uninstalled from system.
Ok, mysql-server and mysql-server-5.1 are actually two different packages, so it's trying to configure the latter and that's what's messing up. Try this:
Wow ... Thanks. I thought that mysql-server is a meta reference package for current version of mysql ( mysql-server-5.1 ) but I guess it doesn't work that way. Thanks again. I got it working. Now, onto what got me into this mess in the first place, phpmyadmin.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.