I am facing a long lasting issue on this command
- bin/magento setup:upgrade
I have made an extension hello world on magento2 stable version, which will simply print hello world on screen.
The thing is when I ran that....it gave me setup version, not specified error (though I have specified)...then I searched & ran this command -
bin/magento setup:upgrade
When I ran above command then I met with another error....pdo_mysql is not installed....
Then I solved that error with the following commands: sudo apt-get install php5-mysql sudo apt-get install pdo-mysql
then by doing php -m I could see the pdo_mysql in extensions list :)
But then as ran that command (bin/magento setup:upgrade) again....I got another error (very frustrated). Please check the attachment.
For solving that error I referred this one.... https://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq
I typed this: sudo find / -type s so I got the list in that one of the line is like this...... /opt/lampp/var/mysql/mysql.sock
now in that article, it says......"Once you find where the socket is being opened, add or edit the line to your /etc/my.cnf file with the path to the socket file".........so I opened /etc/my.cnf but....I found that the line is already there.....socket = /opt/lampp/var/mysql/mysql.sock
Then it says to run this : kill -9 4969 or pkill -9 mysqld but I did not run...I am afraid it can cause damage to xampp...
Then it says....."After you do this you might want to look for a pid file in /var/run/mysqld/ and delete it" but the thing is I can not find mysqld folder inside var/run/ so I am confused what to do now....
Many times I restarted xampp by first stopping apache like this: sudo /etc/init.d/apache2 stop
But could not resolve the issue...
Can anyone please give the correct solution?
Magento 2 becomes a big problem running in Ubuntu for me :)