81 votes
Accepted

ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04

I found a solution at here link, by following this solution I have solved my problem. Short steps are: sudo mysql -u root ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'...
74 votes
Accepted

Change Apache document root folder to secondary hard drive

You'll have to edit apache2.conf and 000-default.conf to change the document root of apache. The Apache server is installed on /var/www/html.This is the default root directory of apache. Either change ...
Harjot's user avatar
  • 756
56 votes
Accepted

xampplib: line 22: netstat: command not found

It seems that your xampp instance is complaining about lack of netstat command. netstat is a part of net-tools package, so run this command to install netstat: sudo apt install net-tools Then try ...
Ravexina's user avatar
  • 55.7k
38 votes

Resetting forgotten phpmyadmin password

You don't actually need to reset your username and password, if you can see them. In your terminal window, type: sudo -H gedit /etc/dbconfig-common/phpmyadmin.conf This will open your phpmyadmin ...
lordparthurnaax's user avatar
29 votes

How to solve the phpmyadmin not found issue after upgrading php and apache?

Usually this is an issue after a vanilla install in 16.04, 18.04 and 20.04 (Focal Fossa) and higher too. To fix it: sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf ...
Rael Gugelmin Cunha's user avatar
26 votes

Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

I ran into this once and this worked for me: source /etc/apache2/envvars apache2 -V sudo service apache2 restart I haven't had the problem since.
EnterUserNameHere's user avatar
26 votes
Accepted

Open port on ubuntu 16.04

To allow a port sudo ufw allow 3306 if its ufw is not installed is probably iptables sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
Eduard Florinescu's user avatar
26 votes

ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04

I found another way that is much better as we need not to give any password for local system. It is as followed. Open terminal and type sudo mysql -u root -p It will prompt you in mysql, here you ...
Krunal Pathak's user avatar
22 votes
Accepted

Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

That looks like you tried to start Apache by running something like apache2 That doesn't work. Use sudo service apache2 start instead.
Florian Diesch's user avatar
20 votes
Accepted

Apache config - how to enable additional ports

In Ubuntu Xenial: Add additional ports in the /etc/apache2/ports.conf like so: Listen 80 Listen 8888 Now in your VirtualHost file add that port like so: <VirtualHost *:80 *:8888> .... &...
George Udosen's user avatar
19 votes

Where can I locate LAMP

LAMP is a set of programs. It stands for: Linux (Operating system) Apache (Webserver) MySQL (Database) PHP (Programming language) So LAMP isn't a single thingie you can find, but a combination ...
Soren A's user avatar
  • 6,783
18 votes

netstat: command not found

Found out I'm supposed to use sudo apt install net-tools for this
Dr-Bracket's user avatar
  • 1,178
17 votes

Error Installing mySql on Ubuntu 16.04

This answer is also in answer to 16.04 upgrade broke mysql-server but which I cannot answer as the admin locked it to 10 reputation. The error in APT occurs during the upgrade of Ubuntu to 16.04 (...
Kaceo's user avatar
  • 171
15 votes

How to have two versions of PHP installed and switch easily between them?

I installed php 5.6 and 7.0 but besides all tips it kept running 5.6, so this command saves the day (in my case i chosse option 1 and restart apache): sudo update-alternatives --config php
Marcelo Ágil's user avatar
15 votes

Why do I get 404 on LAMP Permalinks (Using wordpress)

Open a terminal and type: sudo gedit /etc/apache2/apache2.conf Find this: <Directory /var/www/> Change AllowOverride None to AllowOverride All Then run: sudo a2enmod rewrite Dont forget ...
Marcelo Austria's user avatar
13 votes

Manually Start LAMP Server

This will start Apache, MySql and ProFTPD. Just write this in terminal: sudo /opt/lampp/lampp start
Md Sifatul Islam's user avatar
13 votes

How to Install LAMP server on Ubuntu

LAMP refers to Linux+Apache+MySQL+PHP so installing these will give you an LAMP server, to install that easily you can use tasksel which you can install by opening a terminal (ctrl+alt+t) and do: ...
Videonauth's user avatar
  • 33.3k
13 votes
Accepted

Website is not loading index.php and showing index of folder

Change the name of the Index.php file to index.php. Linux servers are case-sensitive. The index.html, index.htm, or index.php file names must be in all lowercase in order to be found. If the server ...
karel's user avatar
  • 115k
10 votes

Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

The correct answer is quite simple yet not obvious. The apache2 service in Ubuntu/Debian uses the environment file /etc/apache2/envvars during its startup via apache2ctl restart or service apache2 ...
dimib's user avatar
  • 201
9 votes

Resetting forgotten phpmyadmin password

There is a workaround on Debian (Ubuntu, Mint, etc.) where there is a second admin account automatically generated by the system called debian-sys-maint You can see (and should not change) its ...
Petr Kosvanec's user avatar
9 votes

php showing source code in localhost

you need to install libapache2-mod-php sudo apt-get install libapache2-mod-php it is no longer pulled by other packages as a dependency in 14.04 it named libapache2-mod-php5, in 16.04 they dropped ...
GM-Script-Writer-62850's user avatar
9 votes

LAMP installation problem

In the command you provided there is a space character missing between nano and the following path. Use: sudo nano /etc/apache2/mods-enabled/dir.conf sudo is a command that takes another command as ...
techraf's user avatar
  • 3,316
9 votes

Ubuntu 18.04 LTS after fresh install of MySQL / PHPMyadmin; no root password; unable to login with PHPmyadmin

I had the same problem. Apparently MySQL was set up by default to use socket-based authentication, which uses the system username, and not a password. To fix the problem, I used the following commands:...
heyjoe's user avatar
  • 91
8 votes
Accepted

How to get PHP 7.0 running with Apache2

Open the terminal and type: sudo apt install libapache2-mod-php7.0 # install PHP7 module for Apache2 webserver sudo a2enmod php7.0 # enable the PHP7 module sudo service apache2 reload # restart ...
karel's user avatar
  • 115k
8 votes
Accepted

unable to locate package php7.0 and libapache2-mod-php7.0

It appears you are missing the repository for php7. Adding the php7 ppa: sudo add-apt-repository ppa:ondrej/php Then update: sudo apt-get update Now do a search to confirm php7 is there: sudo apt ...
George Udosen's user avatar
7 votes

How can I install php5-mcrypt

php5-mcrypt (MCrypt module for php5) has been updated to php7.0-mcrypt (libmcrypt module for PHP) in Ubuntu 16.04, 16.10 and 17.04. The command sudo apt-get install lamp-server^ in Ubuntu 16.04 ...
karel's user avatar
  • 115k
7 votes

How to install LAMP in Windows 10 Ubuntu Bash

To resolvethe host just add it to /etc/hosts, like at the example: For more details read this answer. According to the @Rinzwind's comment, I think, port 80/443 must be opened in the Windows ...
pa4080's user avatar
  • 29.8k
7 votes
Accepted

Apache 403 Forbidden Error

You have to allow Apache to access the root folder of your LAMP files: See https://stackoverflow.com/questions/9110179/adding-virtualhost-fails-access-forbidden-error-403-xampp-windows-7 Edit the ...
Adam Rustler's user avatar
7 votes
Accepted

Lubuntu & LAMP server?

Yes you can! To install the most basic LAMP stack on Ubuntu you can do the following: sudo apt update sudo apt install apache2 mysql-server php libapache2-mod-php You might want depending on your ...
Videonauth's user avatar
  • 33.3k

Only top scored, non community-wiki answers of a minimum length are eligible