# restarting msql on Ubuntu 12.04 LTS

**URL:** <https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226>\
**Category:** Other MySQL® Questions\
**Created:** [January 24, 2014, 1:06pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226 "2014-01-24T13:06:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuiberts](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phuiberts](https://forums.percona.com/u/phuiberts)\
**Post date:** [January 24, 2014, 1:06pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/1 "2014-01-24T13:06:53Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [January 24, 2014, 3:18pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/2 "2014-01-24T15:18:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [January 26, 2014, 7:15pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/3 "2014-01-26T19:15:52Z")

</div>

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.

[url][https://help.ubuntu.com/community/AppArmor[/url]](https://help.ubuntu.com/community/AppArmor%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![phuiberts](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phuiberts](https://forums.percona.com/u/phuiberts)\
**Post date:** [January 27, 2014, 9:38am UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/4 "2014-01-27T09:38:10Z")

</div>

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](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/](http://tools.percona.com/)) version REL5-20120208

# Configuration name atl-lso-percona-test generated for [huibertsp&#64;leidos.com](mailto:huibertsp&#64;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\_SUBSTITUTION,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

---

<div class="post-metadata">

**Author:** ![phuiberts](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phuiberts](https://forums.percona.com/u/phuiberts)\
**Post date:** [January 27, 2014, 1:33pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/5 "2014-01-27T13:33:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![phuiberts](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phuiberts](https://forums.percona.com/u/phuiberts)\
**Post date:** [January 27, 2014, 1:41pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/6 "2014-01-27T13:41:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![phuiberts](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@phuiberts](https://forums.percona.com/u/phuiberts)\
**Post date:** [January 28, 2014, 4:32pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/7 "2014-01-28T16:32:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [January 28, 2014, 11:38pm UTC](https://forums.percona.com/t/restarting-msql-on-ubuntu-12-04-lts/3226/8 "2014-01-28T23:38:24Z")

</div>

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. =)
