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 -v
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2016-04-15T18:00:57
fabio@fabio-HP-Pavilion-dv6:~$ php -v
Il programma "php" può essere trovato nei seguenti pacchetti:
* php7.0-cli
* hhvm
Provare: sudo apt install
fabio@fabio-HP-Pavilion-dv6:~$ mysql -v
ERROR 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_method
QSslSocket: cannot resolve SSLv2_server_method
The terminal above is now stuck and the ampps windows below is open
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 HOME
but phpmyadmin doesn't let me in and trow this access denied message
that obviously seems i denied access to myself somehow and my test website shows
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:129
Stack 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:144
Stack 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 mysql
mysql: /usr/bin/mysql /usr/lib/mysql /etc/mysql /usr/share/mysql/usr/share/man/man1/mysql.1.gz
fabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ whereis apache2
apache2: /usr/sbin/apache2 /usr/lib/apache2 /etc/apache2 /usr/share/man/man8/apache2.8.gz
fabio@fabio-HP-Pavilion-dv6:/usr/local/ampps$ whereis php
php: /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?
No comments:
Post a Comment