How to log in to phpmyadmin on ubuntu

I installed LAMP on Ubuntu, and I can't open phpmyadmin. So it outputs 404

http://localhost/tools/phpmyadmin

http://localhost/phpmyadmin

Via the console mysql -uroot-proot everything is normal

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 63
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Then I enter CREATE DATABASE box;. Writes

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'box'

2 answers

This helped me with ubuntu 14.04 (taken from here):

Installing / uninstalling Apache2 + php5 + MySQL + phpMyAdmin

Installation

Update the information about the packages:

apt-get update

Update the system:

apt-get upgrade

Install apache:

sudo apt-get install apache2

Run apache:

sudo invoke-rc.d apache2 start

You can also stop or restart apache:

For ubuntu:

Sudo invoke-rc.d apache2 restart

For debian:

/etc/init.d/apache2 restart

Setting php and dependencies:

sudo apt-get install php5 libapache2-mod-php5

Installing the MySQL server:

sudo apt-get install mysql-server

You need to change the password root to the server DB:

sudo mysqladmin -u root password новый_пароль

Setting phpMyAdmin:

sudo apt-get install phpmyadmin

Making a "soft link" (symlink) to the directory where {[16] is located]}phpMyAdmin:

sudo ln -s /usr/share/phpmyadmin/ /var/www/pma

Delete

Deleting packages in reverse all right:

sudo apt-get purge phpmyadmin php5-mysql php5 mysql-server apache2

Removing dependencies:

sudo apt-get purge apache2.2-common apache2-mpm-prefork libapache2-mod-php5

Deleting directories (only apache2):

sudo rm -rf /etc/apache2/ /etc/php5/apache2/

The fact is that you do not have a directory phpmyadmin, but there is a directory pma, and you need to make a soft link (symlink).

Then, as you write symlink, restart the server, call it like this:

http://localhost/pma

Or rename the folder to phpmyadmin, it will be in var/www.

 2
Author: Дух сообщества, 2020-06-12 12:52:24

You can make a symbolic link from the {[1] directory]} phpmyadmin, for example, to the root of the site, and then log in to this address.

 -3
Author: Magi, 2015-07-07 10:46:08