I want to thank you in advance if you manage to get all the way through this post and give me some ideas. It's a lot. I am on Ubuntu 16.04 on a 64bit Dell 1820. It is dual boot with Windows, and I've been using this setup since 16.04 came out. I have had no use for Apache, PHP, or MySQL on this setup until now.I wanted to set up a local Wordpress, so I went to a 'one-click' solution called ampps. This thing bundles over 400 programs in a self contained LAMP. However, the default version of PHP was 5.5, which a great many apps (maybe the majority) reported back through the ampps dashboard that they couldn't use. I figured out how to switch it to PHP 7, whereupon Wordpress informed me that:Your PHP installation appears to be missing the MySQL extension which is required by WordPress.Numerous postings to their support system and forum got me nowhere, so I came here.It turns out ampps default setup:has no php.ini file in either 7.0 or 7.1There are ini files in PHP 5.3 and 5.5Opening the ini files routes through WINE, and open in a version of notepad. Is that a red flag?So I thought, what the heck, I've got my own MySQL and PHP 7 as part of Ubuntu 16.04. And I can install and configure Apache. It's been 4 or 5 years, but I've done it. I tried opening mysql directly:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)That's how I learned that I don't have /var/run/mysqld/mysqld.sock. I don't even have  /var/run/mysqld!Stumbling blindly around the internet, I found out that I should check /etc/mysql/my.cnf. But this file only had one line in it:!includedir /etc/mysql/conf.d/And all conf.d/mysql.conf has in it is:[mysql]So I put the port and localhost in my.cnf, at which point I got a new fatal error.after restart:malikarumi@Tetuoan2:~$ mysqlmysql: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf at line 19!mysql: [ERROR] Fatal error in defaults handling. Program aborted!malikarumi@Tetuoan2:~$port=3306  #   this is line 19bind-address=127.0.0.1Turns out I had to put [mysql] on the first line of my.cnf. Now I was back where I started - nowhere.I decided I would just start over by removing mysql 5.6 and reinstalling. Well, that didn't go well either:malikarumi@Tetuoan2:~$ sudo apt-get install mysql-serverReading package lists... Done''Building dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:  libmircommon5 linux-headers-4.4.0-78 linux-headers-4.4.0-78-generic  linux-headers-4.4.0-79 linux-headers-4.4.0-79-generic  linux-image-4.4.0-78-generic linux-image-4.4.0-79-generic  linux-image-extra-4.4.0-78-generic linux-image-extra-4.4.0-79-generic  linux-signed-image-4.4.0-78-generic linux-signed-image-4.4.0-79-genericUse 'sudo apt autoremove' to remove them.The following additional packages will be installed:  libevent-core-2.0-5 libhtml-template-perl mysql-client-5.7  mysql-client-core-5.7 mysql-server-5.7 mysql-server-core-5.7Suggested packages:  libipc-sharedcache-perl tinycaThe following packages will be REMOVED:  mysql-client-core-5.6 mysql-server-core-5.6The following NEW packages will be installed:  libevent-core-2.0-5 libhtml-template-perl mysql-client-5.7  mysql-client-core-5.7 mysql-server mysql-server-5.7 mysql-server-core-5.70 upgraded, 7 newly installed, 2 to remove and 0 not upgraded.Need to get 18.3 MB of archives.After this operation, 113 MB of additional disk space will be used.Do you want to continue? [Y/n] yGet:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.18-0ubuntu0.16.04.1 [6,340 kB]Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.18-0ubuntu0.16.04.1 [7,566 kB]Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.18-0ubuntu0.16.04.1 [1,725 kB]Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-2ubuntu0.16.04.1 [70.6 kB]Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.18-0ubuntu0.16.04.1 [2,554 kB]Get:6 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB]Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.18-0ubuntu0.16.04.1 [10.8 kB]Fetched 18.3 MB in 24s (746 kB/s)Preconfiguring packages ...dpkg: mysql-client-core-5.6: dependency problems, but removing anyway as you requested: akonadi-backend-mysql depends on mysql-client-core-5.7 | virtual-mysql-client-core; however:  Package mysql-client-core-5.7 is not installed.  Package virtual-mysql-client-core is not installed.  Package mysql-client-core-5.6 which provides virtual-mysql-client-core is to be removed.(Reading database ... 374021 files and directories currently installed.)Removing mysql-client-core-5.6 (5.6.31-0ubuntu0.15.10.1) ...Processing triggers for man-db (2.7.5-1) ...Selecting previously unselected package mysql-client-core-5.7.(Reading database ... 374013 files and directories currently installed.)Preparing to unpack .../mysql-client-core-5.7_5.7.18-0ubuntu0.16.04.1_amd64.deb ...Unpacking mysql-client-core-5.7 (5.7.18-0ubuntu0.16.04.1) ...Processing triggers for man-db (2.7.5-1) ...dpkg: mysql-server-core-5.6: dependency problems, but removing anyway as you requested: akonadi-backend-mysql depends on mysql-server-core-5.7 | virtual-mysql-server-core; however:  Package mysql-server-core-5.7 is not installed.  Package virtual-mysql-server-core is not installed.  Package mysql-server-core-5.6 which provides virtual-mysql-server-core is to be removed.(Reading database ... 374022 files and directories currently installed.)Removing mysql-server-core-5.6 (5.6.31-0ubuntu0.15.10.1) ...Processing triggers for man-db (2.7.5-1) ...Selecting previously unselected package mysql-server-core-5.7.(Reading database ... 373927 files and directories currently installed.)Preparing to unpack .../mysql-server-core-5.7_5.7.18-0ubuntu0.16.04.1_amd64.deb ...Unpacking mysql-server-core-5.7 (5.7.18-0ubuntu0.16.04.1) ...Selecting previously unselected package mysql-client-5.7.Preparing to unpack .../mysql-client-5.7_5.7.18-0ubuntu0.16.04.1_amd64.deb ...Unpacking mysql-client-5.7 (5.7.18-0ubuntu0.16.04.1) ...Selecting previously unselected package libevent-core-2.0-5:amd64.Preparing to unpack .../libevent-core-2.0-5_2.0.21-stable-2ubuntu0.16.04.1_amd64.deb ...Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ...Selecting previously unselected package mysql-server-5.7.Preparing to unpack .../mysql-server-5.7_5.7.18-0ubuntu0.16.04.1_amd64.deb ...Unpacking mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) ...Selecting previously unselected package libhtml-template-perl.Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...Unpacking libhtml-template-perl (2.95-2) ...Selecting previously unselected package mysql-server.Preparing to unpack .../mysql-server_5.7.18-0ubuntu0.16.04.1_all.deb ...Unpacking mysql-server (5.7.18-0ubuntu0.16.04.1) ...Processing triggers for man-db (2.7.5-1) ...Processing triggers for libc-bin (2.23-0ubuntu9) .../sbin/ldconfig.real: File /usr/local/lib/libQtCore.so is empty, not checked./sbin/ldconfig.real: /lib/x86_64-linux-gnu/libssl.so.1.0.0 is not a symbolic link/sbin/ldconfig.real: /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 is not a symbolic linkProcessing triggers for systemd (229-4ubuntu17) ...Processing triggers for ureadahead (0.100.0-19) ...ureadahead will be reprofiled on next rebootSetting up mysql-client-core-5.7 (5.7.18-0ubuntu0.16.04.1) ...Setting up mysql-server-core-5.7 (5.7.18-0ubuntu0.16.04.1) ...Setting up mysql-client-5.7 (5.7.18-0ubuntu0.16.04.1) ...Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ...Setting up mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) ...update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto modeRenaming removed key_buffer and myisam-recover options (if present)insserv: warning: script 'K01ampps' missing LSB tags and overridesinsserv: warning: script 'K01httpd' missing LSB tags and overridesinsserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: script mysql: service mysql already provided!insserv: exiting now!update-rc.d: error: insserv rejected the script headerdpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1'Setting up libhtml-template-perl (2.95-2) ...dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however:  Package mysql-server-5.7 is not configured yet.`dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfiguredNo apport report written because the error message indicates its a followup error from a previous failure.                          Processing triggers for libc-bin (2.23-0ubuntu9) .../sbin/ldconfig.real: File /usr/local/lib/libQtCore.so is empty, not checked./sbin/ldconfig.real: /lib/x86_64-linux-gnu/libssl.so.1.0.0 is not a symbolic link/sbin/ldconfig.real: /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 is not a symbolic linkProcessing triggers for systemd (229-4ubuntu17) ...Processing triggers for ureadahead (0.100.0-19) ...Errors were encountered while processing: mysql-server-5.7 mysql-serverE: Sub-process /usr/bin/dpkg returned an error code (1)malikarumi@Tetuoan2:~$ The Canonical/Ubuntu system referred me to the bug tracker:https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1623440But this issue is considered expired - not fixed - because there's been no activity for 60 days!!!Finally, I found out about the command apt-show-versions, ( from here: dpkg won`t install any package) so I tried that to see what I could find out:malikarumi@Tetuoan2:~$ apt-show-versionsThe program 'apt-show-versions' is currently not installed. You can install it by typing:sudo apt install apt-show-versionsmalikarumi@Tetuoan2:~$ sudo apt install apt-show-versions[sudo] password for malikarumi: Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following NEW packages will be installed:  apt-show-versions0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.2 not fully installed or removed.Need to get 29.6 kB of archives.After this operation, 163 kB of additional disk space will be used.Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 apt-show-versions all 0.22.7 [29.6 kB]Fetched 29.6 kB in 0s (44.9 kB/s)Selecting previously unselected package apt-show-versions.(Reading database ... 309531 files and directories currently installed.)Preparing to unpack .../apt-show-versions_0.22.7_all.deb ...Unpacking apt-show-versions (0.22.7) ...Processing triggers for man-db (2.7.5-1) ...Setting up mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) ...Renaming removed key_buffer and myisam-recover options (if present)insserv: warning: script 'K01ampps' missing LSB tags and overridesinsserv: warning: script 'K01httpd' missing LSB tags and overridesinsserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: Script mongod is broken: incomplete LSB comment.insserv: missingRequired-Start:' entry: please add even if empty.insserv: missing Required-Stop:'  entry: please add even if empty.insserv: script mysql: service mysql already provided!insserv: exiting now!update-rc.d: error: insserv rejected the script headerdpkg: error processing package mysql-server-5.7 (--configure): subprocess installed post-installation script returned error exit status 1dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.7; however:  Package mysql-server-5.7 is not configured yet.dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfiguredSetting up apt-show-versions (0.22.7) ...No apport report written because the error message indicates its a followup error from a previous failure.                          ** initializing cache. This may take a while **Errors were encountered while processing: mysql-server-5.7 mysql-serverE: Sub-process /usr/bin/dpkg returned an error code (1)malikarumi@Tetuoan2:~$ sudo dpkg --auditThe following packages have been unpacked but not yet configured.They must be configured using dpkg --configure or the configuremenu option in dselect for them to work: mysql-server         MySQL database server (metapackage depending on the latesThe following packages are only half configured, probably due to problemsconfiguring them the first time.  The configuration should be retried usingdpkg --configure <package> or the configure menu option in dselect: mysql-server-5.7     MySQL database server binaries and system database setupmalikarumi@Tetuoan2:~$ sudo dpkg -CThe following packages have been unpacked but not yet configured.They must be configured using dpkg --configure or the configuremenu option in dselect for them to work: mysql-server         MySQL database server (metapackage depending on the latesThe following packages are only half configured, probably due to problemsconfiguring them the first time.  The configuration should be retried usingdpkg --configure <package> or the configure menu option in dselect: mysql-server-5.7     MySQL database server binaries and system database setupmalikarumi@Tetuoan2:~$ sudo dpkg --configuredpkg: error: --configure needs at least one package name argumentType dpkg --help for help about installing and deinstalling packages [*];Use 'apt' or 'aptitude' for user-friendly package management;Type dpkg -Dhelp for a list of dpkg debug flag values;Type dpkg --force-help for a list of forcing options;Type dpkg-deb --help for help about manipulating *.deb files;Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !malikarumi@Tetuoan2:~$ I could see I already had a --configure error in the output so I didn't run this.Unlike the op in that other unix exchange question, I have not (knowingly) mixed OSes, and in other respects my OS seems to be fine, so I have not tried his solution. It is at this point that I came here to post. Suggestions?
Fun with Ubuntu 16.04 and mysql
ubuntu;mysql