AWS CIS AMI unable to install mysql

312
July 21, 2017, at 04:46 AM

I have launched an instance on Amazon Web Services (AWS), with the following AMI: CIS Amazon Linux Benchmark v2.0.0.1 - Level 1

I tried to install mysql with the command sudo apt-get install mysql-server-5.5

And here is the full stdout of this command:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.5 mysql-client-core-5.5 mysql-common
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
  libsql-statement-perl tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5
0 upgraded, 8 newly installed, 0 to remove and 45 not upgraded.
Need to get 4,770 kB/5,765 kB of archives.
After this operation, 76.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-common all 5.5.57-0ubuntu0.14.04.1 [13.0 kB]
Get:2 http://security.ubuntu.com/ubuntu/ trusty-security/main libmysqlclient18 amd64 5.5.57-0ubuntu0.14.04.1 [596 kB]
Get:3 http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-core-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [707 kB]
Get:4 http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-client-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [1,588 kB]
Get:5 http://security.ubuntu.com/ubuntu/ trusty-security/main mysql-server-5.5 amd64 5.5.57-0ubuntu0.14.04.1 [1,866 kB]
Fetched 4,770 kB in 3s (1,419 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 77746 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.5.57-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.57-0ubuntu0.14.04.1) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.57-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.57-0ubuntu0.14.04.1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_amd64.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1ubuntu0.1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.025-1ubuntu0.1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mysql-client-core-5.5.
Preparing to unpack .../mysql-client-core-5.5_5.5.57-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.57-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.57-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.57-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
fopen: Permission denied
Setting up mysql-common (5.5.57-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 78013 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.57-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.5 (5.5.57-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
fopen: Permission denied
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libmysqlclient18:amd64 (5.5.57-0ubuntu0.14.04.1) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libdbd-mysql-perl (4.025-1ubuntu0.1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mysql-client-core-5.5 (5.5.57-0ubuntu0.14.04.1) ...
Setting up mysql-client-5.5 (5.5.57-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.5 (5.5.57-0ubuntu0.14.04.1) ...
170720 17:36:42 [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.
170720 17:36:42 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
170720 17:36:42 [Note] /usr/sbin/mysqld (mysqld 5.5.57-0ubuntu0.14.04.1) starting as process 3691 ...
170720 17:36:42 [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.
170720 17:36:42 [Note] Plugin 'FEDERATED' is disabled.
170720 17:36:42 MyISAM: The MyISAM memory heap is disabled
170720 17:36:42 MyISAM: Mutexes and rw_locks use GCC atomic builtins
170720 17:36:42 MyISAM: Compressed tables use zlib 1.2.8
170720 17:36:42 MyISAM: Using Linux native AIO
170720 17:36:42 MyISAM: Initializing buffer pool, size = 128.0M
170720 17:36:42 MyISAM: Completed initialization of buffer pool
170720 17:36:42 MyISAM: highest supported file format is Barracuda.
170720 17:36:42  MyISAM: Waiting for the background threads to start
170720 17:36:43 MyISAM: 5.5.57 started; log sequence number 1595675
ERROR: 1146  Table 'mysql.user' doesn't exist
170720 17:36:43 [ERROR] Aborting
170720 17:36:43  MyISAM: Starting shutdown...
170720 17:36:44  MyISAM: Shutdown completed; log sequence number 1595675
170720 17:36:44 [Note] /usr/sbin/mysqld: Shutdown complete
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish

The error opened another screen in the terminal and the following was printing:

Unable to set password for the Mysql "root" user
An error occurred while setting 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.

So I found this stackoverflow question that seemed perfect but after removing mysql recommanded in the top answer by entering the sequence of command the error would still occur when trying to install again.

Then looking at the stdout I noticed the error fopen: Permission denied, which after some research I understood that it usually happens when the owner of the man page in /var/cache/man is root. This is not the case for me. man is the actual owner of the directories in /var/cache/man

Then I looked into man-db because Processing triggers for man-db (2.6.7.1-1ubuntu1) ... is printed right before the fopen error but I didn't find anything concluding.

I'm looking for any lead on how to troubleshoot this problem.

Rent Charter Buses Company
READ ALSO
How to get the only the 2nd best score in MySqL? not the others

How to get the only the 2nd best score in MySqL? not the others

i have one server whit minigames, and i have a problem whit my database, i need to get in query of mysql only the 2nd best score namecan anyone help-me? this is my database:

258
Append data with concat that does not already exist mysql

Append data with concat that does not already exist mysql

Is there an easy way to only append data to an existing column if it does not exist?

335
how to display all table data to view file when click to a button in codeigniter?

how to display all table data to view file when click to a button in codeigniter?

I have a cart table call tbl_cartI would like to display all the tbl_cart data to the view file (usercart

224