[SOLVED] :: New install stuck on installing mysql configuration

15 posts / 0 new
Last post
#1 Sun, 08/03/2014 - 13:11
chriszanf

[SOLVED] :: New install stuck on installing mysql configuration

Hello,

I am reinstalling Virtualmin after having a server clear out and its stuck on a particular bit with creating the MySQL configuration and has been hanging (at the time of writing) for around an hour.

Below is the part it gets stuck on:

Any help or insights greatly appreciated!

Configuration file '/etc/mysql/conf.d/mysqld_safe_syslog.cnf', does not exist on system.

Installing new config file as you requested.


Configuration file '/etc/init/mysql.conf', does not exist on system.

Installing new config file as you requested.


Configuration file '/etc/init.d/mysql', does not exist on system.

Installing new config file as you requested.


Configuration file `/etc/apparmor.d/usr.sbin.mysqld', does not exist on system.

Installing new config file as you requested.

......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
..................

If I interrupt it (pressing ctrl + C), I get the following message:

^Cdpkg: error processing package mysql-server-5.5 (--configure):
subprocess installed post-installation script was interrupted

and then it continues until it gets to this.....

Configuration file `/etc/php5/mods-available/json.ini', does not exist on system.
Installing new config file as you requested.
php5_invoke: Enable module json for cli SAPI
php5_invoke: Enable module json for apache2 SAPI
.php5_invoke: Enable module json for cgi SAPI
Errors were encountered while processing:
mysql-server-5.5
mysql-server
.E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
Sun, 08/03/2014 - 21:16
andreychek

Howdy,

What distro/version is it that you're using there?

-Eric

Mon, 08/04/2014 - 06:42 (Reply to #2)
chriszanf

Its Ubuntu 14.04

Once the script went through installing, I removed Mysql through apt-get ([url=http://stackoverflow.com/questions/10853004/removing-mysql-5-5-completel... these instructions[/url]) then reinstalled doing the same but reversed (if you get my drift).

Now on the webmin web interface, it says that MySQL isnt running but when I click to start it, it says its already running.

If I go to SSH, it says the following:

mysql -v

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

service mysql start

start: Job is already running: mysql

If I look on my.cnf, the config for sock is pointing the right place

Mon, 08/04/2014 - 09:56
andreychek

Howdy,

What output do you receive when running this command:

ps auxw | grep mysql

And could you attach your /etc/my.cnf file?

Thanks!

-Eric

Mon, 08/04/2014 - 10:04
chriszanf

ps auxw | grep mysql

mysql    14220  2.0  1.5 160556 15796 ?        Ss   10:35   0:00 /usr/sbin/mysqld
root     14233  0.0  0.0  10416   932 pts/4    S+   10:35   0:00 grep --color=auto mysql
root     25118  0.0  0.1  42380  1436 ?        S    Aug03   0:00 sudo apt-get install mysql-server php5-mysql
root     25119  2.7  1.2  90240 12636 ?        S    Aug03  25:41 apt-get install mysql-server php5-mysql
root     28278  0.0  0.0  15408   928 pts/3    Ss+  Aug03   0:00 /usr/bin/dpkg --status-fd 50 --configure libaio1:amd64 libmysqlclient18:amd64 libdbd-mysql-perl:amd64 libterm-readkey-perl:amd64 mysql-client-core-5.5:amd64 mysql-client-5.5:amd64 mysql-server-core-5.5:amd64 mysql-server-5.5:amd64 php5-mysql:amd64 libhtml-template-perl:all mysql-server:all
root     28287  0.0  0.2  62640  2296 pts/3    S+   Aug03   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-server-5.5.postinst configure
root     28297  0.0  0.1  11244  1340 pts/3    S+   Aug03   0:00 /bin/bash /var/lib/dpkg/info/mysql-server-5.5.postinst configure
root     28414  0.0  0.0   4396   640 pts/3    S+   Aug03   0:00 /bin/sh /usr/sbin/invoke-rc.d mysq start
root     28443  1.4  9.3 115780 98068 pts/3    S+   Aug03  13:58 start mysql

My.cnf contents

cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size         = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
Mon, 08/04/2014 - 10:33
andreychek

Howdy,

Ah, it doesn't appear that apt-get ever completed the installation of MySQL.

Was that run from the command line? If so, what output are you seeing from that command (if any)?

-Eric

Sun, 08/17/2014 - 04:13
chriszanf

This is how I solved the problem:

  • I re-flashed the VPS with Ubuntu 14.04 LTS.
  • I made various tweaks to the server through SSH (rebuilt locales, set up SSH timeout, fixed GPG error, etc)
  • Updated apt-get
  • Installed mysql-server-5.5

I did try installing MySQL 5.6 but it didnt work so I had to re-flash and went back to installing 5.5. It appears that MySQL is not installed and so hangs when running the Virtualmin installer script, and so gets SSH timeouts/broken pipe unless you set it up not to.

  • Once installed, I ran apt-get update / upgrade again.

  • wget virtualmin installer script

  • sh install.sh

It then installed ok and flew past the "Configuration file `/etc/apparmor.d/usr.sbin.mysqld', does not exist on system" and got to the end in no time at all (total install time was around 10 - 15 minutes but cant be too sure as I was doing other stuff).

After that, it was just more tweaks to the server to suit my tastes!

Thanks to those that replied and tried to help.

Thu, 10/16/2014 - 09:46
spxero

I had the same issue and found this in the Ubuntu forums:

http://askubuntu.com/questions/506243/mysql-strange-installations-problems

The solution was to reinstall bsdutils:

apt-get --reinstall install bsdutils

Mon, 05/11/2015 - 13:50 (Reply to #8)
orangehand

I crashed out of the mysql process, having got hundreds of dots, and the script continued to install all else. Should I run the bsdutils reinstall then run the install.sh script again?

Mon, 05/11/2015 - 13:59
orangehand

Having crashed out of the the mysql install and let all the other parts of the script run, I nor get the line of dots at the prompt, so this ain't right!! Should I reboot, reinstall OS, run the bsdutils install then run the virtualmin script?

It was done on a clean install of Ubuntu 1404 LTS. I cannot risk the install not being good as I need to migrate my 10.04 vm host to this new 14.04 host.....

Tue, 05/12/2015 - 03:02
Diabolico
Diabolico's picture

This is old problem what i could never sort out. Last time i try was before 1 month and same error is jumping out no matter what i did. I try so many suggestions and no one of them worked out for me.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Tue, 05/12/2015 - 03:09
orangehand

Will see what happens!

Tue, 05/12/2015 - 03:21
Diabolico
Diabolico's picture

Please if you manage to sort your problem could you post it here how you did that. I'm more of centos when it comes to servers but still i would like to know if there is solution for this problem.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Tue, 05/12/2015 - 04:06
orangehand

The install onto a cleanCentos 7 minimal installation went without a hitch. I will stay with Centos I think, especially as migrations are transferable between the different supported OS's.

Running install.sh on Centos seems a lot less verbose than the ubuntu install, but all was successful it seems!

Onward and upwards!

Tue, 05/12/2015 - 04:27
Diabolico
Diabolico's picture

Please then take a look on my post here http://www.virtualmin.com/node/36980 just to be on safe side. Not sure why they didnt put this topic as sticky because a lot of people were locked out from their server for the same reason i described in that post.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.