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.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Error when apt-get install mysql-server
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 Setting up heirloom-mailx (12.5-2) ... update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode Setting up libhtml-template-perl (2.91-1) ... dpkg: dependency problems prevent configuration of mysql-server: 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 E: Sub-process /usr/bin/dpkg returned an error code (1)
It gave that when I use apt-get to install MySQL after a fresh OS install (Debian 7). Please help!
Comments
Try
apt-get install -f
If that doesn't fix the dependency's purge MySQL and reinstall.
apt-get --purge mysql*
apt-get install mysql-server
what does your /etc/apt/sources.list look like?
I tried the solution from here:http://stackoverflow.com/questions/13276088/cant-start-mysql5-5-on-ubuntu-12-04-dpkg-dependency-problems
But it does not work for me. BTW, there are errors before shows the above errors:
And then a screen pop up saying Unable to set password for the MySQL "root" user. Then came this
http://forum.openvz.org/index.php?t=msg&goto=44068&
Because google is just too difficult
Increase the global limit for the server in "/proc/sys/fs/aio-max-nr"
Before, I have spent days trying to fresh install mysql-server with this problem but without luck. It's because the dialog-like package not installed from the start (Solus template). That also explain why you unable to set password for the MySQL "root" user.
Please see http://kb.parallels.com/en/117251
But if mysql-server already installed @TheRedFox is the best answer.
Just wget dialog then from the repo and install it via "installpkg dialog*.txz". After that you'll be able to install mysqld.
Edit: Sorry I misread the topic :x Just apt-get it.
As I remember apt-get dialog or whiptail won't fix the problem. But I just noobs.
Read here: https://www.kernel.org/doc/Documentation/sysctl/fs.txt (ctrl+f within the page for aio-max-nr)
Run the following command in SSH with sudo or as a root: sysctl -a |grep aio
Paste here what you get back from the above command.
If fs.aio-nr excceeds fs.aio-max-nr then you're in trouble; you may try to increase the fs.aio-max-nr.
Also if you're not going to use InnoDB storage engine you may disable it by adding the following to /etc/mysql/my.cnf file in [mysqld] section:
@lewekleonek
InnoDB disabled following your instruction, but the problem still
Increase the global limit for the server in "/proc/sys/fs/aio-max-nr"
The aio-max-nr is 65536, I added "innodb_use_native_aio=0" to my.conf ([mysqld] block I assumed), "Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!"
It seems it has to be done from the provider's end?
1) Re-enable InnoDB; it may be needed because you may have some InnoDB tables in your database, so remove the following lines from your my.cnf file:
2) As a root, run the following command (which will increase the fs.aio-max-nr, it has to be bigger than fs.aio-nr) :
The above is not going to stick when you re-boot the operating system, but we'll worry about this later
3) Try to start mysqld again
Let us know what happened.
Thank you lewekleonek. But running the second command gave:
I am already root, but still got a permission denied?
Dear everyone, as I aware that the installation not finished yet due unable to save root password, so any config modification won't be helpful. @jrdai you need to inform your vps provider that your Debian template went wrong. That it!
You don't have the permission, even you are root. It's your provider that have the power.
Looks like we're running here out of options.
Last thing before you contact your provider:
Edit /etc/sysctl.conf file as a root and append the following line to this config file:
After that run:
If the above does not work - restart the server and try to start mysqld again.
Run sysctl -a |grep aio and post the output (to confirm that aio-max-nr was increased).
Thank you @lewekleonek, very helpful for me being nearly desperate. I've contacted the provider, and now
Looks much better now.
First try to reconfigure mysql server:
If the above does not work, i.e. it won't ask you to set debian-sys-maint password, then re-install the packages from scratch:
I removed all the mysql application again, then installed again and it seems working, but just one info
I did "mysqlcheck --all-databases --repair -u root -p", but it still gave that
Remove mysql-server package again, but make sure you run the apt-get purge mysql-server when doing that.
Just in case see if there are any files left behind in /var/lib/mysql - clean out this directory before you re-install mysql-server.
I did just exactly that, and gave "Checking for tables which need an upgrade, are corrupt or were
not closed cleanly.." which seemed to be unable to fix
@jrdai AFAIK it's normal. It's only checking for errors.
Oh yeah... that's right... I'm too tired to think well...
It's [info] message only. You're good to go. Make sure you back-up your database frequently.