• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


phpmyadmin install / configure on nginx ubuntu 20.04 apache2 debian 10

 

 

 

Installing PHPMyAdmin on nginx ubuntu

 

First command to update ubuntu or Debian

 

  1. install with 1 command

sudo apt-get update

sudo apt-get install phpmyadmin

 

While installation

default configuration for lighttpd and apache

phpmyadmin-install on ubutu nginx part 2

press tab to leave. or

Press Esc because NGINX is not on the list provided.

 

Configure database for phpmyadmin with dbconfig-common?

PhpMyAdmin requires a database to work with. In this package configuration prompt, choose Yes

 

dbconfig-common package

phpmyadmin-install on ubutu nginx

│ <Yes> <No>

 

Enter mysql password if you chose yes for DB Config

create-a-password-for-phpmyadmin-to-register-with-mysql

Configuring NGINX to Serve PhpMyAdmin Site

 

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

optiona1 security

sudo ln -s /usr/share/phpmyadmin /var/www/html/secretword

$ sudo chmod 775 -R /usr/share/phpmyadmin/
$ sudo chown root:www-data -R /usr/share/phpmyadmin/

 

 

reload restart nginx web server

sudo systemctl restart nginx

or

nginx  -s reload

 

Test Phpmyadmin installation

serverip/phpmyadmin

 

 

sudo phpenmod mcrypt

WARNING: Module mcrypt ini file doesn’t exist under /etc/php/7.1/mods-available

sudo apt install php7.1-mcrypt && sudo apt install php7.1-mbstring

Setting up php7.1-mcrypt (7.1.9-1+ubuntu16.04.1+deb.sury.org+1) …
Creating config file /etc/php/7.1/mods-available/mcrypt.ini with new version
php7.1-mbstring is already the newest version

 

sudo a2enmod mcrypt
ERROR: Module mcrypt does not exist!

sudo ln -s /etc/php/7.1/conf.d/mcrypt.ini /etc/php/7.1/mods-available/mcrypt.ini

failed to create symbolic link ‘/etc/php/7.1/mods-available/mcrypt.ini’: Fil e exists

 

Then enable them with:
sudo a2enmod mcrypt
sudo a2enmod mbstring

sudo service php7.4-fpm restart

 

Secure phpmyadmin installation – step 2.1

 

sudo ln -s /usr/share/phpmyadmin /var/www/html/secret

sudo nano /etc/nginx/snippets/phpmyadmin.conf

location /secret {
root /var/www/html;
index index.php;
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?$args;

location ~ ^/secret/(doc|sql|setup)/ {
deny all;
}

location ~ /secret/(.+\.php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

}
}

or basic step 2.1 phpmyadmin nginx configuration

sudo nano /etc/nginx/snippets/phpmyadmin.conf

location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}

Step 3

include snippets/phpmyadmin.conf;

 

include snippets/phpmyadmin.conf;

include snippets/sqlc.conf;

phmyadmin install sucessful

 

 

errors may occurs

[error] 2562720#2562720: *24086422 open() “/usr/share/phpmyadmin/sqlc” failed (2: No such file or directory), client: 103.228.33.114, server: rajugi2ne.com, request: “GET /sqlc HTTP/1.1”, host: “194.195.113.187”
2021/12/31 13:03:52 [notice] 2562770#2562770: signal process started

in default server block or any domain.

 

sudo apt-get install php7.4-mbstring

 

phpmyadmin location in ubnutu

/usr/share/phpmyadmin

 

Create symbolic link

sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html

or

sudo ln -s /usr/share/phpmyadmin /var/www/html/secret

 

Assign www user to & file permission

$ sudo chmod 775 -R /usr/share/phpmyadmin/
$ sudo chown root:www-data -R /usr/share/phpmyadmin/

 

cd /usr/share/nginx/html && ls -l

-rw-r–r– 1 root root 612 Jan 31 2017 index.html
lrwxrwxrwx 1 root root 21 Sep 27 06:04 phpMyAdmin -> /usr/share/phpmyadmin

 

 

 

part 3 nginx server block for phpmyadmin

sudo nano /etc/nginx/sites-available/default

 

 

location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}

 

save changes

service nginx restart

or nginx -s reload

 

Securing phpmyadmin login page

 

cd /usr/share/nginx/html && ls -l

-rw-r–r– 1 root root 612 Jan 31 2017 index.html
lrwxrwxrwx 1 root root 21 Sep 27 06:04 phpMyAdmin -> /usr/share/phpmyadmin

renaming phpmyadmin
sudo mv phpmyadmin Desired Name

or

sudo ln -s /usr/share/phpmyadmin /var/www/html/secret

 

next add root location for server block.

server block

 

modify

Addthis

Htaccess password in nginx using crypt()

 

Look at digital ocean

Youtube video tutorial 

 

2nd & easy way to configure phpmyadmin var/www/html nginx

install phpmyadmin

symlic phpmyadmin folder to var/www/html

add server block to /var/www/html

access phpmyadmin page from browser.

filepermission & owner is optional.

install phpmyadmin apache2 Debian

sudo apt-get install phpmyadmin

 

two alerts

1 configure DB or not

install apache  Lighttpd  (select apache).

 

 

[php7:error] [pid 7626] [client 123.201.77.106:10105] PHP Fatal error: Uncaught Error: Call to undefined function __() in /usr/share/phpmyadmin/libraries/core.lib.php:235\nStack trace:\n#0 /usr/share/phpmyadmin/libraries/core.lib.php(308): PMA_fatalError(‘The [a@./url.ph…’)\n#1 /usr/share/phpmyadmin/libraries/common.inc.php(90): PMA_warnMissingExtension(‘mbstring’, true)\n#2 /usr/share/phpmyadmin/index.php(12): require_once(‘/usr/share/phpm…’)\n#3 {main}\n thrown in /usr/share/phpmyadmin/libraries/core.lib.php on line 235

500 internal server occurrs

 

if

then go /var/log/apache2/error.log

sudo apt-get install php-mbstring

sudo service apache2 restart

Then open your ip/phpmyadmin

if not worked then try this

sudo nano /etc/php/7.0/apache2/php.ini

Then uncomment

;extension=php_mbstring.dll   or use this command sudo phpenmod mbstring

 

 

Secure or rename page

 

sudo nano /etc/phpmyadmin/apache.conf

 

Alias /phpmyadmin /usr/share/phpmyadmin  to

Alias /secretword /usr/share/phpmyadmin

 

service apache2 reload

 

now your new phpmyadmin login url is ip/secretword.

 

 

troubleshooting

mysqli_real_connect(): (HY000/1045): Access denied for user ‘phpmyadmin’@’localhost’ (using password: YES)

Create a database named ‘phpmyadmin’ and setup the phpMyAdmin configuration storage there.

no db or no user.

/etc/phpmyadmin/config.inc.php

$cfg[‘Servers’][$i][‘controluser’] = $dbuser;
$cfg[‘Servers’][$i][‘controlpass’] = $dbpass;
/* Optional: Advanced phpMyAdmin features */
$cfg[‘Servers’][$i][‘pmadb’] = $dbname;

/etc/phpmyadmin/config-db.php

 

$dbuser=’phpmyadmin’;
$dbpass=’pass’;
$basepath=”;
$dbname=’phpmyadmin’;
$dbserver=’localhost’;
$dbport=’3306′;
$dbtype=’mysql’;

 

mysql> CREATE USER ‘phpmyadmin’@’%’ IDENTIFIED BY ‘pass’ ;

mysql> CREATE USER ‘p’@’%’ IDENTIFIED BY ‘MyPasswordHere!

mysql> GRANT ALL PRIVILEGES ON *.* TO ‘phpmyadmin’@’%’ WITH GRANT OPTION;

onfiguration of pmadb… not OK

 

 

Database export & import using Phpmyadmin

There is web server limits for phpmyadmin max file upload size and max execution time. so reupload same dump it will continue further.

export database:

just select all tables,

select export and

click on Go.

Drop / deleting a database in Phpmyadmin

 

Select database >> goto >> Operation>>

CLick on Drop Database.

Copying database in Phpmyadmin

 

go to operations >> select copy database to new or existing.

 

Copy tables to another database using in phpmyadmin

 

Select database and go operations and click on copy table to another database.

 

CHange table charset and collation in phpmyadmin

you can do in phpmyadmin panel, select table or database change collation settings.

 

Configuring Password Access for the MySQL Root Account

SELECT user,authentication_string,plugin,host FROM mysql.user;

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH caching_sha2_password BY ‘password’;

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

SELECT user,authentication_string,plugin,host FROM mysql.user;

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

SELECT user,authentication_string,plugin,host FROM mysql.user;

CREATE USER ‘sammy’@’localhost’ IDENTIFIED WITH caching_sha2_password BY ‘password’;

ALTER USER ‘sammy’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

GRANT ALL PRIVILEGES ON *.* TO ‘sammy’@’localhost’ WITH GRANT OPTION;

FInd replace in mysql phpmyadmin

mysql phpmyadmin find replace

 

troubleshoot

2022/11/14 05:54:17 [error] 10407#10407: *2768 FastCGI sent in stderr: “PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/blowfish_secret.inc.php Check group www-data has read access and open_basedir restrictions” while reading response header from upstream, client: 103.228.33.114, server: rajugi2ne.com, request: “GET /phpmyadmin/index.php?route=/recent-table&ajax_request=1&recent_table=1&no_debug=true&_nocache=1668405256620516619&token=4169763f3147544c4266475c4a22597e HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “159.65.149.73”

Related topics:

  1. windows laptop battery health check in windows 11 command prompt and other softwares
  2. Pubg new season rewards & leaks updates & latest news
  3. nginx conf explained best config file performance tuning tips nginx.conf location errors tutorial
  4. change wordpress site url
  5. walking and weight loss and health benefits for heart blood sugar cholesterol fertility

tutorials

  • Vivek Bindra Videos Transcription (business strategy)
  • git commands
  • new relic php agent install in 3 steps
  • new relic mysql install integration - 2 ways fix problems
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • Devops course Syllabus topics PDF AWS, Azure, cisco, redhat
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
    • mysql 8 installation on ubuntu 20.4
    • mysql auto backup ubuntu 22.04 using automysqlbackup
    • mysqltuner installation suggestions
    • mysql memory limit setting increase or decrease allocation
    • mysql open_files_limit increase to raise open file cache table definition cache
    • mysql restart ubuntu status start stop in linux windows reload
    • monitoring mysql with new relic
    • mysql access denied for user 'root'@'localhost' (using password yes) no Error 1045
    • mysql slow query log enable disable set query time ideal mysql long query time
    • mysql user creation, password , grant permissions user management guide
    • mysql root password change reset update set A-Z info
    • mysql configuration file location linux , windows , mac
    • mysqldump import /export mysql database command line, phpmyadmin, Cpanel, mysql workbench, xamp
    • MySQL query cache vs redis vs memcached buffer pool database cache
    • MySQL innodb memory allocation & usage calculation
    • mysql max connections limit check increase how to decide thread cache size
    • Innodb vs myisam (table engines row lock vs table lock)
    • mysql errors
    • mysql workbench tutorials (Sql Development , modelling, server admin export & import)
    • How measure & adjust mysql buffer pool size by pages, read requests etc
    • improve mysql performance wordpress my.cnf file configuration
    • phpmyadmin install / configure on nginx ubuntu 20.04 apache2 debian 10
    • mysql commands
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2023 - All Rights Reserved Disclaimer & Privacy Policy