Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Mysql install error on debian
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Mysql install error on debian

mahjongmahjong Member
edited December 2011 in Help

Dear Users,
I'm facing a problem on installing mysql on my vps.
I have debian 6 i386 installed, with this source file:
http://pastebin.com/qjBrpJKW
I already installed and configured nginx,exim4,php5-fpm etc. but mysql.
Every time i try to install it with apt-get mysql-server (fresh install) it starts, then asks for password - after adding root password it continues and then later displays a message with Unable to set password for the MySQL "root" user and then it shows some error:

mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server

Full install messages: http://pastebin.com/rpaZe8GC

it is the same every time i try to install - even if i try to install only mysql-server-5.5 (not mysql-server).
I can't start mysql nor reconfigure it. If i try to uninstall mysql-server it tries to reinstall it (and asks for password then says it is already set, and displays the same error as above.

I tried to play with installing first some of the dependencies, and two days ago i was able to succesfully install it, but i really don't know how :(. I just tried and tried and somehow i was able to start mysql.
Just to mention: i had the same error on debian 5 and on debian 6 without dotdeb repositories - so i think it definitely some kind of dependency / install order error.

Please give me some advice on this!

Thank you very much!

Comments

  • This is odd for Debian. Typically apt-get install mysql-common mysql-client mysql-server is all you need.

    Perhaps try to dpkg-reconfigure, and apt-get remove --purge if that doesn't take?

  • Yeah, i'd recommend purging it and making sure that the etc/mysql/ directory has been totally removed before trying to install it again.

    I also had trouble with it a few days ago!

  • I had this problem on a VPS before. How much RAM is on your VPS and is it running OpenVZ?

  • You are using aptitude which is always a good idea....
    so
    1>aptitude purge mysql-server should clean everything
    2>aptitude install mysql-server, no need for anything else.

    Will you then get the same error: /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read?

  • Ok, thanks for all the suggestions yet, but sadly they are not working. Installing it on a fresh system didn't work too. Also tried the purge remove packages and delete every msql file on drive, and install it again (with aptitude or apt-get, tried both) but it always fails - it asks for password, after giving it continues, then later on it says Unable to set password for the MySQL "root" user as it is already set then comes the error message:
    (it is different from the first error in the thread, because i tried to install mysql-server-5.5, not mysql-server, but it makes no difference)
    Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
    invoke-rc.d: initscript mysql, action "start" failed.
    dpkg: error processing mysql-server-5.5 (--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.5
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    A package failed to install. Trying to recover:
    Setting up mysql-server-5.5 (5.5.18-1~dotdeb.1) ...
    Stopping MySQL database server: mysqld.
    Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
    invoke-rc.d: initscript mysql, action "start" failed.
    dpkg: error processing mysql-server-5.5 (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    mysql-server-5.5

  • Everything you installed before went through correctly?

  • mahjongmahjong Member
    edited December 2011

    TigersWay: "/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read" was just my fault, i posted an error where i didn't install mysql-common after purging the /etc/mysql directory. It was just a one time error, the main problem is the "locked" password - i think it tries to install something twice, or installs an older version of mysql-server, sets password then fails. I don't really know, but once already installed mysql succesfully so something is with the package management.

  • TigersWay: Yes

  • i can give root acces if someone would like to take a look and have time. I really would love to learn server management but when i find such problems i can't get over them.

  • I would try to install it first on a clean/minimal template to avoid both trouble of memory as @Zetta said, or a trouble with another package...
    But not much more idea now

  • Zetta: 128mb ram and burstable to 256. It is openvz.
    I tried to install it to fresh system. Even without dotdeb, only using default debian packages/repos. In that case you can copy the old error and paste it, only change the mysql-server to 5.1. Everything else is the same.

  • Also my current system is freshly installed,only a few things run using about 20mb ram.

  • TigersWayTigersWay Member
    edited December 2011

    No wonder :-) You will not succeed to install properly mysql 5.5 with only 256, you need nearly 300 on a totally cleaned template on openvz, because of InnoDB.
    You have to block the automatic start, have a look here: https://github.com/TigersWay/VPS/blob/master/vps/lxmp.sh, line 82, 86 and of course 90!

  • I see, but isn't that interesting only after i installed mysql? On old system if i remember correctly people were only unable to start mysql. But i am unable to install it.
    I have this two line in my.cnf:
    skip-innodb
    default-storage-engine=MyISAM

  • mysql server is started during the installation procedure... That's 1 of the reason of the "trick" I talked above.

  • ok, thanks, i will try it and write back later!

  • skip-innodb causes an error with MySql 5.5
    See http://www.lowendtalk.com/discussion/460/nginx-1.0.8-on-dotdeb/p1
    My post of November 11

  • mahjongmahjong Member
    edited December 2011

    Hi!
    For Keith: i just copied those two lines from TigersWay github script, in my script skip-innodb is already changed to
    ignore_builtin_innodb
    default_storage_engine=MyISAM

    For TigersWay: i created the policy rd file and installed mysql the way you doing it in your script. It installs now, but still with error messages. Also: aren't there any other way? It seems to me like a little patch/hack, and in neither of the lowend scripts can be found this solution - most of them simply installs mysql server, and modify settings after installation - but i can't get there, as it cannot be installed (error already posted above)

    So, my question is: how to fully install mysql-server on low-ram openvz (128mb, burstable to 256)? (just to mention - with centos it installs without any problem, with debain 5-6 it fails when innodb starts, even though innodb is disabled in my.cnf (on mysql 5.5 i tried with the new lines as mentioned above, so skip-innodb is not cousing any error). Don't answer with "Then go with Centos", i want to stick with debian.

    The errors are already mentioned above.

    Ps.: the problem is definitely with ram, as on a 256ram-512burst vps the installation went smoothly without errors.

  • My version of lowendscript, now at https://github.com/Keith2/lowendscript-ng
    installs MySql 5.5/php5-fpm with Squeeze ok, using a 128MB burstable to 256MB vps.

  • @mahjong said: n my script skip-innodb is already changed to

    ignore_builtin_innodb

    I still don't use this, and it's still working for me.

    @mahjong said: install mysql-server on low-ram openvz (128mb, burstable to 256)?

    Well, sorry, but I don't have any more any 128 with which I could try. And sadly no budget is going to open for a while.

  • @mahjong said: Also: aren't there any other way? It seems to me like a little patch/hack, and in neither of the lowend scripts can be found this solution

    By the way, it's totally official "trick": Debian doc!

  • mahjongmahjong Member
    edited December 2011

    Keith: tried it, are these errors normal?:
    http://www.imageserve.info/img_store/2011/12/15/6/62583c59aa23f8f9cea29082f0cc324c.jpg
    http://www.imageserve.info/img_store/2011/12/15/1/108c10d57c3fb6962d0df3c8819a51dc.jpg
    http://www.imageserve.info/img_store/2011/12/15/a/afe79547aa8edbdcab6c02fb258282e2.jpg

    Mysql is up and running, also were able to set root password (with both Tigersway and Keith's script), but mysql fails to stop with service mysql stop also with /etc/init.d/mysql stop. Is it a bug? That is the reason i never had the courage to keep such installs. For me it do really seems that something goes wrong at some stage.

  • The message

    Checking for tables which need an upgrade, are corrupt or were 
    not closed cleanly..
    

    The Access denied for user 'debian-sys-maint' is one I haven't seen before.
    I've had the dependency messages with a low memory vps (64MB no burst) before.

    MySQL will not be stopping if the pid of the process has somehow not been stored correctly in /var/run, you may have to kill the process manually.

    Did you reinstall the OS before running my script? If not do that & try again.

  • Hi!
    Yes, i installed in a fresh system. Also first run the system install part of the script, then mysql.

  • mahjongmahjong Member
    edited December 2011

    Ok, here is the way i solved the last error:
    after the installation read the /etc/mysql/debian.cnf file. There should be the password for the user debian-sys-maint. Save the password, or memorize it, etc.

    Log in to mysql with root and add the permissions for the debian-sys-maint user to start and stop mysql:

    GRANT SHUTDOWN ON . TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password you found in debian.cnf';

    GRANT SELECT ON `mysql`.`user` TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password you found in debian.cnf';

    Now quit and you can stop/start mysql.

    Thanks for every help, i think now every problem has been solved (at least i hope)!

Sign In or Register to comment.