Mysql-Server-5.5

Discussion in 'Installation/Configuration' started by otacon, Mar 25, 2014.

  1. otacon

    otacon New Member

    Mysql-Server-5.5 (SOLVED)

    I just bought a new VPS with Debian 7.4 (wheezy) installed on it.

    The first thing I do it try to install my basic components, such as Mysql-Client and Mysql-Server, but I am not able to get the server to complete the install.


    Code:
    root@stephensdev:/etc# apt-get install libmysqlclient-dev mysql-client
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
      libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-common
    Suggested packages:
      libterm-readkey-perl
    The following NEW packages will be installed:
      libdbd-mysql-perl libmysqlclient-dev libmysqlclient18 mysql-client mysql-client-5.5 mysql-common
    0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
    Need to get 3829 kB of archives.
    After this operation, 47.3 MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://ftp.us.debian.org/debian/ stable/main libdbd-mysql-perl amd64 4.021-1+b1 [126 kB]
    Get:2 http://security.debian.org/ wheezy/updates/main mysql-common all 5.5.35+dfsg-0+wheezy1 [84.4 kB]
    Get:3 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.35+dfsg-0+wheezy1 [687 kB]
    Get:4 http://security.debian.org/ wheezy/updates/main libmysqlclient-dev amd64 5.5.35+dfsg-0+wheezy1 [952 kB]
    Get:5 http://security.debian.org/ wheezy/updates/main mysql-client-5.5 amd64 5.5.35+dfsg-0+wheezy1 [1898 kB]
    Get:6 http://security.debian.org/ wheezy/updates/main mysql-client all 5.5.35+dfsg-0+wheezy1 [82.5 kB]
    Fetched 3829 kB in 1s (2579 kB/s)
    Selecting previously unselected package mysql-common.
     Package configuration
     ────────────────────────────────────────────────────────────────────────────────────────────────────────────
                                 ┌────────Configuring mysql-server-5.5───────────┐
                                 │                                               │
                                 │                                               │
                                 │ Repeat password for the MySQL "root" user:    │
                                 │ ┌───────────────────────────────────────────┐ │
                                 │ │                                           │ │
                                 ├─└───────────────────────────────────────────┘─┤
                                 │                   <  OK  >                    │
                                 └───────────────────────────────────────────────┘
     Package configuration
     ────────────────────────────────────────────────────────────────────────────────────────────────────────────
    ┌─────────────────────────────────────Configuring mysql-server-5.5────────────────────────────────────────┐
    │ Unable to set password for the MySQL "root" user                                                        │
    │                                                                                                         │
    │ An error occurred while setting the password for the MySQL administrative user. This may have           │
    │ happened because the account already has a password, or because of a communication problem with the     │
    │ MySQL server.                                                                                           │
    │                                                                                                         │
    │ You should check the account's password after the package installation.                                 │
    │                                                                                                         │
    │ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information.                │
    │                                                                                                         │
    │                                                                                                         │
    ├─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │                                               <  OK  >                                                  │
    └─────────────────────────────────────────────────────────────────────────────────────────────────────────┘
    [FAIL failed!ng MySQL database server: mysqld . . . . . . . . . . . . . .
    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
    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)
    root@stephensdev:/etc#
    Upon Google searching the issue I am told how to clear the installation and try again, but nothing is working. Does anyone else have any suggestions for me to try?

    I have done the following so far:

    1. apt-get remove --purge mysql\*
    2. apt-get clean
    3. rm -rf /etc/mysql
    4. retry installation.
     
    Last edited: Mar 26, 2014
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    check the permissions in /var/lib/mysql.

    I had the same problem with wheezy. For some reason some files / dirs where not owned by mysql.mysql.

    You fix this by editing the sql-start-script. See here at the end.
     
  3. otacon

    otacon New Member

    Thanks florian,

    By stopping the error from the Mysql Start I was able to install the package, but I can't start the server as it fails every time after removing the exit 0 from the launch daemon.

    I was looking at my /var/lib/mysql and found all of them to be under the mysql user:

    Code:
    l    0 Mar 25 12:42 debian-5.5.flag
    drwx------ 2 mysql mysql 4096 Mar 25 12:17 mysql
    drwx------ 2 mysql mysql 4096 Mar 25 12:42 performance_schema
    root@stephensdev:/etc/mysql#
    mysql

    Code:
    root@stephensdev:/var/lib/mysql/mysql# ls -l .
    total 1012
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 columns_priv.MYD
    -rw-rw---- 1 mysql mysql   4096 Mar 25 12:17 columns_priv.MYI
    -rw-rw---- 1 mysql mysql   8820 Mar 25 12:17 columns_priv.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 db.MYD
    -rw-rw---- 1 mysql mysql   2048 Mar 25 12:42 db.MYI
    -rw-rw---- 1 mysql mysql   9582 Mar 25 12:17 db.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 event.MYD
    -rw-rw---- 1 mysql mysql   2048 Mar 25 12:17 event.MYI
    -rw-rw---- 1 mysql mysql  10223 Mar 25 12:17 event.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 func.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 func.MYI
    -rw-rw---- 1 mysql mysql   8665 Mar 25 12:17 func.frm
    -rw-rw---- 1 mysql mysql     35 Mar 25 12:42 general_log.CSM
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 general_log.CSV
    -rw-rw---- 1 mysql mysql   8776 Mar 25 12:17 general_log.frm
    -rw-rw---- 1 mysql mysql   1120 Mar 25 12:42 help_category.MYD
    -rw-rw---- 1 mysql mysql   3072 Mar 25 12:42 help_category.MYI
    -rw-rw---- 1 mysql mysql   8700 Mar 25 12:17 help_category.frm
    -rw-rw---- 1 mysql mysql  91999 Mar 25 12:42 help_keyword.MYD
    -rw-rw---- 1 mysql mysql  17408 Mar 25 12:42 help_keyword.MYI
    -rw-rw---- 1 mysql mysql   8612 Mar 25 12:17 help_keyword.frm
    -rw-rw---- 1 mysql mysql   9423 Mar 25 12:42 help_relation.MYD
    -rw-rw---- 1 mysql mysql  18432 Mar 25 12:42 help_relation.MYI
    -rw-rw---- 1 mysql mysql   8630 Mar 25 12:17 help_relation.frm
    -rw-rw---- 1 mysql mysql 466836 Mar 25 12:42 help_topic.MYD
    -rw-rw---- 1 mysql mysql  21504 Mar 25 12:42 help_topic.MYI
    -rw-rw---- 1 mysql mysql   8770 Mar 25 12:17 help_topic.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 host.MYD
    -rw-rw---- 1 mysql mysql   2048 Mar 25 12:17 host.MYI
    -rw-rw---- 1 mysql mysql   9510 Mar 25 12:17 host.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 ndb_binlog_index.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 ndb_binlog_index.MYI
    -rw-rw---- 1 mysql mysql   8778 Mar 25 12:17 ndb_binlog_index.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 plugin.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 plugin.MYI
    -rw-rw---- 1 mysql mysql   8586 Mar 25 12:17 plugin.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 proc.MYD
    -rw-rw---- 1 mysql mysql   2048 Mar 25 12:17 proc.MYI
    -rw-rw---- 1 mysql mysql   9996 Mar 25 12:17 proc.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 procs_priv.MYD
    -rw-rw---- 1 mysql mysql   4096 Mar 25 12:17 procs_priv.MYI
    -rw-rw---- 1 mysql mysql   8875 Mar 25 12:17 procs_priv.frm
    -rw-rw---- 1 mysql mysql   1386 Mar 25 12:17 proxies_priv.MYD
    -rw-rw---- 1 mysql mysql   5120 Mar 25 12:17 proxies_priv.MYI
    -rw-rw---- 1 mysql mysql   8800 Mar 25 12:17 proxies_priv.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 servers.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 servers.MYI
    -rw-rw---- 1 mysql mysql   8838 Mar 25 12:17 servers.frm
    -rw-rw---- 1 mysql mysql     35 Mar 25 12:42 slow_log.CSM
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 slow_log.CSV
    -rw-rw---- 1 mysql mysql   8976 Mar 25 12:17 slow_log.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 tables_priv.MYD
    -rw-rw---- 1 mysql mysql   4096 Mar 25 12:17 tables_priv.MYI
    -rw-rw---- 1 mysql mysql   8955 Mar 25 12:17 tables_priv.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 time_zone.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 time_zone.MYI
    -rw-rw---- 1 mysql mysql   8636 Mar 25 12:17 time_zone.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 time_zone_leap_second.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 time_zone_leap_second.MYI
    -rw-rw---- 1 mysql mysql   8624 Mar 25 12:17 time_zone_leap_second.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 time_zone_name.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 time_zone_name.MYI
    -rw-rw---- 1 mysql mysql   8606 Mar 25 12:17 time_zone_name.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 time_zone_transition.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 time_zone_transition.MYI
    -rw-rw---- 1 mysql mysql   8686 Mar 25 12:17 time_zone_transition.frm
    -rw-rw---- 1 mysql mysql      0 Mar 25 12:17 time_zone_transition_type.MYD
    -rw-rw---- 1 mysql mysql   1024 Mar 25 12:17 time_zone_transition_type.MYI
    -rw-rw---- 1 mysql mysql   8748 Mar 25 12:17 time_zone_transition_type.frm
    -rw-rw---- 1 mysql mysql    216 Mar 25 12:17 user.MYD
    -rw-rw---- 1 mysql mysql   2048 Mar 25 12:17 user.MYI
    -rw-rw---- 1 mysql mysql  10630 Mar 25 12:17 user.frm
    performance scheme

    Code:
    -rw-rw---- 1 mysql mysql 8624 Mar 25 12:42 cond_instances.frm
    -rw-rw---- 1 mysql mysql   61 Mar 25 12:42 db.opt
    -rw-rw---- 1 mysql mysql 9220 Mar 25 12:42 events_waits_current.frm
    -rw-rw---- 1 mysql mysql 9220 Mar 25 12:42 events_waits_history.frm
    -rw-rw---- 1 mysql mysql 9220 Mar 25 12:42 events_waits_history_long.frm
    -rw-rw---- 1 mysql mysql 8878 Mar 25 12:42 events_waits_summary_by_instance.frm
    -rw-rw---- 1 mysql mysql 8854 Mar 25 12:42 events_waits_summary_by_thread_by_event_name.frm
    -rw-rw---- 1 mysql mysql 8814 Mar 25 12:42 events_waits_summary_global_by_event_name.frm
    -rw-rw---- 1 mysql mysql 8654 Mar 25 12:42 file_instances.frm
    -rw-rw---- 1 mysql mysql 8800 Mar 25 12:42 file_summary_by_event_name.frm
    -rw-rw---- 1 mysql mysql 8840 Mar 25 12:42 file_summary_by_instance.frm
    -rw-rw---- 1 mysql mysql 8684 Mar 25 12:42 mutex_instances.frm
    -rw-rw---- 1 mysql mysql 8776 Mar 25 12:42 performance_timers.frm
    -rw-rw---- 1 mysql mysql 8758 Mar 25 12:42 rwlock_instances.frm
    -rw-rw---- 1 mysql mysql 8605 Mar 25 12:42 setup_consumers.frm
    -rw-rw---- 1 mysql mysql 8637 Mar 25 12:42 setup_instruments.frm
    -rw-rw---- 1 mysql mysql 8650 Mar 25 12:42 setup_timers.frm
    -rw-rw---- 1 mysql mysql 8650 Mar 25 12:42 threads.frm
    The permissions look good from what I can see.

    I am a little concerned that the logs are completely blank in:

    /var/log/mysql
    /var/log/mysql.err
    /var/log/mysql.log
     
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    You can set the logfiles in your my.cnf. Are you sure that no mysqld is running? ps -ef|grep mysql
     
  5. otacon

    otacon New Member

    Code:
    root@stephensdev:~# ps -ef|grep mysql
    root      2706  2351  0 13:13 pts/0    00:00:00 grep mysql
    root@stephensdev:~# mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    I think that is the client, right?

    I will set the log and get the error soon.

    -------------------------------------------------------
    Here is the error:

    Code:
    Mar 25 13:25:09 stephensdev mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 [Note] Plugin 'FEDERATED' is disabled.
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 InnoDB: The InnoDB memory heap is disabled
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 InnoDB: Compressed tables use zlib 1.2.7
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09 InnoDB: Using Linux native AIO
    Mar 25 13:25:09 stephensdev mysqld: 140325 13:25:09  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
    Mar 25 13:25:09 stephensdev mysqld: InnoDB: Warning: io_setup() attempt 1 failed.
    Mar 25 13:25:10 stephensdev mysqld: InnoDB: Warning: io_setup() attempt 2 failed.
    Mar 25 13:25:10 stephensdev mysqld: InnoDB: Warning: io_setup() attempt 3 failed.
    Mar 25 13:25:11 stephensdev mysqld: InnoDB: Warning: io_setup() attempt 4 failed.
    Mar 25 13:25:11 stephensdev mysqld: InnoDB: Warning: io_setup() attempt 5 failed.
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12  InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
    Mar 25 13:25:12 stephensdev mysqld: InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 InnoDB: Fatal error: cannot initialize AIO sub-system
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 [ERROR] Plugin 'InnoDB' init function returned error.
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 [ERROR] Unknown/unsupported storage engine: InnoDB
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 [ERROR] Aborting
    Mar 25 13:25:12 stephensdev mysqld:
    Mar 25 13:25:12 stephensdev mysqld: 140325 13:25:12 [Note] /usr/sbin/mysqld: Shutdown complete
    Mar 25 13:25:12 stephensdev mysqld:
    Mar 25 13:25:12 stephensdev mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
    Mar 25 13:25:24 stephensdev /etc/init.d/mysql[3857]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 25 13:25:24 stephensdev /etc/init.d/mysql[3857]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 25 13:25:24 stephensdev /etc/init.d/mysql[3857]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 25 13:25:24 stephensdev /etc/init.d/mysql[3857]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Mar 25 13:25:24 stephensdev /etc/init.d/mysql[3857]:
    ----------------------------------------------------------------
    Ok, This is what I have done so far:

    I added the following lines to the my.cnf file:

    innodb_use_sys_malloc = 0 --GET rid of the warning, "The InnoDB memory heap is disabled". Probably didn't help anything
    federated --Gets rid of the warning, "[Note] Plugin 'FEDERATED' is disabled." I really thought it was annoying
    innodb_use_native_aio = 0 --This is what I believe solve part of my issue.

    Here is the error when I start Mysql:

    Code:
    [ ok . Starting MySQL database server: mysqld . adjust the time of day: Operation not permitted
    [info] Checking for tables which need an upgrade, are corrupt or were 12 09:54:55 UTC 2012 (1)
    not closed cleanly..hensdev ntpd[2569]: proto: precision = 0.105 usec
    root@stephensdev:~# ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
    
    Now it looks like some type of permission or access issue. I will keep chugging along.

    ----------------------------------------------------------------------------------
    I reset the debian-sys-maint user's password to the one that is in /etc/mysql/debian.cnf and now it all works. Thanks for your help!
     
    Last edited: Mar 26, 2014

Share This Page