[Techtalk] Cannot get LAMP mysql or php to start

Wim De Smet kromagg at gmail.com
Thu Jan 14 11:59:48 UTC 2010


Hi Leslie,

It's best to reply to list, so others can follow along. :-)

On Thu, Jan 14, 2010 at 10:34 AM, Leslie MacDougall <lesmacdee at gmail.com> wrote:
> Hi, thanks for your reply.
>
> Tweetdeck lives on top of adobe air it seems, so I assume that's a
> different problem entirely.
> Yes. It's just annoying that I can't get anything (except Apache) to
> run after installing. I want to see what TweetDeck is like, but have
> been unable to find a Linux user running it.
>
> can you check to make sure:
> apt-cache policy mysql-server
> apt-cache policy mysql-server-5.0
> dpkg -L mysql-server-5.0 | ls -d >/dev/null (will complain only if any
> of the files are missing on the file system)
> These should be the default packages for mysql-server-5.0 in 9.04 I can see.
>
> I have had quite a time of it with mysql today. I eventually
> discovered that I did not have either mysql_install_db or
> mysql_secure_installation in /usr/bin - it would be interesting to
> know how they got lost! And something tells me that they are rather
> important :S I figured that uninstall-reinstall would be easiest (I am
> a VERY new user - 2 months)

It would be nice to see the outputs of the above commands, to know
what is installed and from where, exactly. (just paste them in a
terminal, you can execute them as a normal user)

> However, last night one of my Linux friends tried a fix and now we are
> stuck in a loop:
>
> I can't do anything unless I run Isudo dpkg --configure -a
> running it gives the above error over an over again no matter which
> option you choose.

Can you give us the error in its entiry? Especially the few lines
before/after it so we know which package is throwing them.

> Tied kill -9 to get out of it when nothing else would work... this results in:
> E: dpkg was interrupted, you must manually run 'sudo dpkg --configure
> -a' to correct the problem.
> Can't do anything... (keep looping forever)
> [...]
> I have just been trying to rm mysql* in /usr/bin and /etc to see if
> that works, but I don't know what I may have missed. What do you think
> I should try? If this doesn't work, will I have to reinstall Ubuntu?

It's probably looping because the post-install script from a package
is broken. We just need to know which package and then we can force
its uninstalling with the appropiate dpkg flags. This is somewhat
risky, but it should clear up these dreaded dpkg loops.

> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>  '/var/run/mysqld/mysqld.sock' (2)
>
> When was this reported to you, during configuration?
> It's a bit complicated. I used a tut to install
> http://www.howtoforge.com/ubuntu_lamp_for_newbies, then tried to run a
> program called Nexty. The programmer who wrote Nexty, said that the
> error message I got seemed to indicate that mysql was not installed,
> but dpkg -f showed it installed and ps -ef showed mysql as not
> running. Neither was php. The sudo apt-get command just said no
> updates were needed or installed.

Okay, the error indeed means that mysql is not running. So this is
more or less a red herring. The real problem is that something went
really wrong during the mysql install. I looked at the tutorial you
linked and it doesn't look like you could have done anything wrong
following that. I'm not quite sure what could have brought this on.
Maybe a bad disk?

regards,
Wim


More information about the Techtalk mailing list