LinuxQuestions.org
Visit Jeremy's Blog.
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 04-02-2013, 02:53 PM   #1
compunuts
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Rep: Reputation: Disabled
Unhappy Reinstalling mysql-server problem


Greetings ......

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.

TIA.
 
Old 04-02-2013, 04:56 PM   #2
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
First thing to try is to purge mysql-server
Code:
aptitude purge mysql-server
If that doesn't do it, try just creating an empty file for my.cnf:
Code:
mkdir /etc/mysql
touch /etc/mysql/my.cnf
Then try purging and reinstalling.
 
1 members found this post helpful.
Old 04-03-2013, 03:35 AM   #3
compunuts
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.

TIA
 
Old 04-03-2013, 09:37 AM   #4
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
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:

Code:
aptitude purge mysql-server-5.1
 
1 members found this post helpful.
Old 04-03-2013, 11:40 AM   #5
compunuts
LQ Newbie
 
Registered: Apr 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need help reinstalling MySql on Debian Etch Azalar Linux - Server 1 10-28-2007 07:39 PM
Problem setting root password after reinstalling mysql Venkatesh_cts Linux - Newbie 4 11-23-2006 08:05 AM
Reinstalling mysql Jongi Fedora 2 10-12-2006 05:01 AM
Deleted the mysql db files from /var/lib/mysql and reinstalling doesn't work! Frostblade Linux - Software 1 05-24-2006 10:16 AM
MySQL server problem after linking (mysql.sock) ewijaya Linux - General 4 01-19-2004 09:46 AM

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

All times are GMT -5. The time now is 12:36 AM.

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