Announcement

Announcement Module
Collapse
No announcement yet.

restarting msql on Ubuntu 12.04 LTS

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • restarting msql on Ubuntu 12.04 LTS

    I have a brand new Ubuntu 12.04LTS install with Percona Server 5.6 installed for evaluation purposes. When I try to restart the server via "/etc/init.d/mysql restart" or stop or Start I get eithe rof the following below. When checing teh server variable, the DB is running but none of the /etc.my.cnf changes have taken. The only way to make the changes take is an actual reboot.

    How to restart mysql without a reboot?

    * Stopping MySQL (Percona Server) mysqld [fail]
    * Starting MySQL (Percona Server) database server mysqld [fail]

  • #2
    Can you please share your mysql error log relevant entries for that error and also check syslog. That should tell us what's the problem during restart.

    Comment


    • #3
      Without seeing the error log, my first guess is going to be a permissions issue with AppArmor. Try disabling it for a test and then restarting MySQL. If that works, then you need to either update the AppArmor config for MySQL or disable AppArmor all together.

      https://help.ubuntu.com/community/AppArmor

      Comment


      • phuiberts
        phuiberts commented
        Editing a comment
        Sorry not familiar enough with AppArmor (I know my bad) to understand. When I moved a regular mysql to a different hdd I had to change the /etc/apparmor.d/usr.sbin.mysqlsd. However with Percona this file doesn't exist; so don't know what to do about that.

    • #4
      As mentioned both Ubuntu and MySQL are virgin installs, all updates are applied. I did manage to move the DB to a second harddrive, but the mysql log doesn't give any errors

      mysql-error.log:ls
      GNU nano 2.2.6 File: /mnt/2ndHDD/mysql_data/mysql-error.log

      140127 09:42:30 mysqld_safe mysqld from pid file /mnt/2ndHDD/mysql_data/mysql.pid ended
      140127 09:43:05 mysqld_safe Starting mysqld daemon with databases from /mnt/2ndHDD/mysql_data/
      2014-01-27 09:43:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more det$
      2014-01-27 09:43:05 1711 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please us$
      2014-01-27 09:43:05 1711 [Note] Plugin 'FEDERATED' is disabled.
      2014-01-27 09:43:05 1711 [Note] InnoDB: The InnoDB memory heap is disabled
      2014-01-27 09:43:05 1711 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2014-01-27 09:43:05 1711 [Note] InnoDB: Compressed tables use zlib 1.2.3
      2014-01-27 09:43:05 1711 [Note] InnoDB: Using Linux native AIO
      2014-01-27 09:43:05 1711 [Note] InnoDB: Using CPU crc32 instructions
      2014-01-27 09:43:05 1711 [Note] InnoDB: Initializing buffer pool, size = 256.0M
      2014-01-27 09:43:05 1711 [Note] InnoDB: Completed initialization of buffer pool
      2014-01-27 09:43:05 1711 [Note] InnoDB: Highest supported file format is Barracuda.
      2014-01-27 09:43:05 1711 [Note] InnoDB: 128 rollback segment(s) are active.
      2014-01-27 09:43:05 1711 [Note] InnoDB: Waiting for purge to start
      2014-01-27 09:43:06 1711 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.15-rel63.0 started; log sequence number 1600677
      2014-01-27 09:43:06 1711 [Note] RSA private key file not found: /mnt/2ndHDD/mysql_data//private_key.pem. Some authentication plugins will not work.
      2014-01-27 09:43:06 1711 [Note] RSA public key file not found: /mnt/2ndHDD/mysql_data//public_key.pem. Some authentication plugins will not work.
      2014-01-27 09:43:06 1711 [Note] Server hostname (bind-address): '*'; port: 3306
      2014-01-27 09:43:06 1711 [Note] IPv6 is available.
      2014-01-27 09:43:06 1711 [Note] - '::' resolves to '::';
      2014-01-27 09:43:06 1711 [Note] Server socket created on IP: '::'.
      2014-01-27 09:43:06 1711 [Warning] 'user' entry 'root@atl-lso-percona-test' ignored in --skip-name-resolve mode.
      2014-01-27 09:43:06 1711 [Warning] 'proxies_priv' entry '@ root@atl-lso-percona-test' ignored in --skip-name-resolve mode.
      2014-01-27 09:43:06 1711 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See$
      2014-01-27 09:43:06 1711 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
      2014-01-27 09:43:06 1711 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See$
      2014-01-27 09:43:06 1711 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. $
      2014-01-27 09:43:06 1711 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.
      2014-01-27 09:43:06 1711 [Note] Event Scheduler: Loaded 0 events
      2014-01-27 09:43:06 1711 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '5.6.15-63.0-log' socket: '/mnt/2ndHDD/mysql_data/mysql.sock' port: 3306 Percona Server (GPL), Release 63.0
      2014-01-27 09:43:06 1711 [Note] Event Scheduler: scheduler thread started with id 1
      140127 09:58:45 mysqld_safe A mysqld process already exists




      for completion the my.cnf:
      GNU nano 2.2.6 File: /etc/my.cnf

      # My.cnf used by Percona.

      # Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
      # Configuration name atl-lso-percona-test generated for huibertsp@leidos.com at 2014-01-24 15:35:49

      [mysql]

      # CLIENT #
      port = 3306
      socket = /mnt/2ndHDD/mysql_Data/mysql.sock

      [mysqld]

      # GENERAL #
      user = mysql
      default-storage-engine = InnoDB
      socket = /mnt/2ndHDD/mysql_data/mysql.sock
      pid-file = /mnt/2ndHDD/mysql_data/mysql.pid

      # MUST DO UTF8 #
      collation-server = utf8_unicode_ci
      character-set-server = utf8
      init_connect = 'SET NAMES utf8, collation_connection=utf8_unicode_ci'

      event_scheduler = 1
      skip-character-set-client-handshake
      group_concat_max_len = 10000

      # MyISAM #
      key-buffer-size = 32M
      myisam-recover = FORCE,BACKUP

      # SAFETY #
      max-allowed-packet = 16M
      max-connect-errors = 1000000
      skip-name-resolve
      sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_S UBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,O$
      innodb = FORCE
      innodb-strict-mode = 1

      # DATA STORAGE #
      datadir = /mnt/2ndHDD/mysql_data/

      # BINARY LOGGING #
      log-bin = /mnt/2ndHDD/mysql_data/mysql-bin
      expire-logs-days = 14
      sync-binlog = 1
      binlog-format = mixed
      binlog_cache_size = 16M

      # CACHES AND LIMITS #
      tmp-table-size = 32M
      max-heap-table-size = 32M
      query-cache-type = 0
      query-cache-size = 0
      max-connections = 500
      thread-cache-size = 50
      open-files-limit = 65535
      table-definition-cache = 1024
      table-open-cache = 2048

      # INNODB #
      innodb-flush-method = O_DIRECT
      Ainnodb-log-files-in-group = 2
      innodb-log-file-size = 512M
      innodb-flush-log-at-trx-commit = 1
      innodb-file-per-table = 1
      innodb-buffer-pool-size = 256M
      innodb_file_per_table = 1

      # LOGGING #
      log-error = /mnt/2ndHDD/mysql_data/mysql-error.log
      log-queries-not-using-indexes = 1
      slow-query-log = 1
      slow-query-log-file = /mnt/2ndHDD/mysql_data/mysql-slow.log



      Comment


      • #5
        is there a way to make Ubuntu more verbose when issuing the /etc/init.d/mysql restart|START|STOP comment?

        Comment


        • #6
          Looks like "service mysql start|stop|restart" works nicely contrary to documentation. I will take that and may entertain adopting Percona Mysql as a production server.

          Comment


          • #7
            Yeah guessing it was still a permissions issue. Ubuntu is strange in the way it handles MySQL as it custom scripts with special users it tries to make you use, and if you deviate from the standard install it gets wonky very quickly. Glad you got it working though. =)

            Comment

            Working...
            X