Quantcast
Channel: How to check and clean Ubuntu 16.04 from multiple Apache, Mysql, php installations? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2

How to check and clean Ubuntu 16.04 from multiple Apache, Mysql, php installations?

$
0
0

I've probably messed up around while familiarizing with ubuntu 16.04 and commands with terminal. I did installed Ampps stack that initially worked fine but an issue with my cron configuration made me look and probably mess something else with mysql before solve it thanks to the forum.

How can I check and incase clean if there are multiple install of apache-mysql-php and different configuration files?

by typing the following commands via terminal this is what i get:

fabio@fabio-HP-Pavilion-dv6:~$ apache2 -vServer version: Apache/2.4.18 (Ubuntu)Server built:   2016-04-15T18:00:57fabio@fabio-HP-Pavilion-dv6:~$ php -vIl programma "php" può essere trovato nei seguenti pacchetti:* php7.0-cli* hhvmProvare: sudo apt install <PACCHETTO SELEZIONATO>fabio@fabio-HP-Pavilion-dv6:~$ mysql -vERROR 1045 (28000): Access denied for user 'fabio'@'localhost' (using password: NO)

here seems php ain't installed but it should be since ampps is working but mysql show denied access.but when i run ampps with the following this the result:

fabio@fabio-HP-Pavilion-dv6:~$ cd /usr/local/ampps/fabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ sudo ./Ampps[sudo] password di fabio: QSslSocket: cannot resolve SSLv2_client_methodQSslSocket: cannot resolve SSLv2_server_method

The terminal above is now stuck and the ampps windows below is open Ampps dash

from here seems i can start apache but can not stop mysql and/or restart it (but it was working before).

Now when i start apache and visit my localhost/ampps from browser everything seems working and i can access to AMMPS HOMEbut phpmyadmin doesn't let me in and trow this access denied message

phpmyadmin-error

that obviously seems i denied access to myself somehow and my test website shows exception magento

by looking at the exception log in /usr/local/ampps/www/magento2/var/log this is what i can see:

[2016-07-11 16:03:19] main.CRITICAL: exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/usr/local/ampps/var/mysql.sock' (2)' in /usr/local/ampps/www/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:129Stack trace: #0 /usr/local/ampps/www/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:host=loca...', 'mage761', 'B[7S!3P465', Array)

and it keeps going with listing stack traces from #0 to #31 than by the end of the log file this is what i see

Next exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/usr/local/ampps/var/mysql.sock' (2)' in /usr/local/ampps/www/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144Stack trace:#0 /usr/local/ampps/www/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() 

and than again it lists stack trace form #0 to #30

There is obviously something wrong with mysql configuration or my guess is multiple instances of lamp installed and not properly configured.

thanks everyone

Edit

I have found this related post Should someone install Apache, MySQL etc. or use ready-made packets like XAMPP for PHP development? where another user says that it's better use the build in lamp stack installable via terminal rather than install such applications like XAMPP and so Ampps i suppose.

I did install tasksel as suggested here and will see to install LAMP stack instead of Ampps

So now my question remain pretty much the same..how can i check and clean the system lets say if I have installed both stacks and messed things up?

I probably have run commands and installed again mysql, phpmyadmin and apache2 after ampps was already installed on ubuntu 16.04 but i was totally lost so i'm not totally sure what i did and i would like to start over.

as suggested by Mic0 this is what i get when i type whereis:

fabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ whereis mysqlmysql: /usr/bin/mysql /usr/lib/mysql /etc/mysql /usr/share/mysql/usr/share/man/man1/mysql.1.gzfabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ whereis apache2apache2: /usr/sbin/apache2 /usr/lib/apache2 /etc/apache2 /usr/share/man/man8/apache2.8.gzfabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ whereis phpphp: /usr/lib/php /etc/php /usr/include/php /usr/share/php7.0-common /usr/share/php7.0-readline

is it how it should look like?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images