Kamis, 24 Maret 2016

mengubah document root apache2

jalankan terminal

sudo nano /etc/apache2/sites-available/000-default.conf

rubah baris berikut sesuai dengan keinginan:
DocumentRoot /var/www/html

rubah juga 
sudo nano /etc/apache2/apache2.conf

rubah juga 
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
 
 
rubah /var/www/html sesuai dengan direktori


simpan

restart apache2
sudo service apache2 restart

Senin, 21 Maret 2016

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Habis Upgrade Ubuntu 12.04 ke 15.10 ternyata harus ada penyesuain kembali terutama di mysql, coba akses ke localhost/phpmyadmin ga bisa masuk,coba akses ke consul ga bisa juga, akhir searching ke mba google dan done, berikut langkah-langkahnya :
coba akses
mysql -u root
 muncul
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

stop servicenya
sudo /etc/init.d/mysql stop
[ ok ] Stopping mysql (via systemctl): mysql.service.

restart
sudo /etc/init.d/mysql restart
[ ok ] Restarting mysql (via systemctl): mysql.service.

mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 220
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.