首页 > 系统相关 >9_How to install phpMyAdmin on Nginx (in 5 minutes)

9_How to install phpMyAdmin on Nginx (in 5 minutes)

时间:2023-06-07 22:11:34浏览次数:53  
标签:PHPMyAdmin Nginx phpmyadmin How install MySQL Copy minutes

 

地址:https://www.codewithharry.com/blogpost/install-phpmyadmin-ubuntu-nginx/

 

 

How to install PhpMyAdmin on Ubuntu running Nginx (LEMP stack)

In this post, we will see how to install phpMyAdmin on servers running Nginx. Follow the steps below:

Step 1 - Installing phpMyAdmin

Enter the following command to install PHPMyAdmin

sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

 

 

 

Step 2 - Configuring MySQL to use a password

Now we will configure password login to MySQL for logging into PHPMyAdmin

Open MySQL console

sudo mysql

and execute the following query to create a new user to be used for PHPMyAdmin. 

CREATE USER 'harry'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'MyStrongPassword1234$';

This creates a new MySQL user named harry with the password - 'MyStrongPassword1234$'

Let's provide this user all the privileges so that we can use it to access the PHPMyAdmin console. Execute the query below

GRANT ALL PRIVILEGES ON *.* TO 'harry'@'localhost' WITH GRANT OPTION;

Let's exit the MySQL console now

exit

 

 

 

Step 3 - Create a symlink

You’ll now need to create a symbolic link from the PHPMyAdmin files to Nginx’s document root directory. This will tell Nginx where PhpMyAdmin files are and how to serve them!

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

Step 4 - Check the installation

Restart Nginx using the command below:

sudo service nginx restart

Now go to the http://<your-server-ip>/phpmyadmin from your browser and login using the username and password you used in step 2.

You should be able to see the PHPMyAdmin interface.

You should now have phpmyadmin configured on your server. You can use this interface to easily create, manage and update your databases. Happy coding!

 

       

标签:PHPMyAdmin,Nginx,phpmyadmin,How,install,MySQL,Copy,minutes
From: https://www.cnblogs.com/hechunfeng/p/17464720.html

相关文章

  • 10_How deploy a Django application using Nginx & Gunicorn in Production
     地址:https://www.codewithharry.com/blogpost/django-deploy-nginx-gunicorn/  HowtohostDjangoApplicationusinggunicorn&nginxinProductionInthispost,wewillseehowtousenginxwithgunicorntoservedjangoapplicationsinproduction. Dj......
  • 4_How to Host Multiple Websites on One Server
     地址:https://www.codewithharry.com/blogpost/host-multiple-websites-ubuntu-vps/  HowtoHostMultipleWebsitesonUbuntuVPS?Anapache2webserverprovidesrobustnessandscalabilityforhostingmultiplewebsitesonyourUbuntuVPS.Thismeansyoucan......
  • 第3天学习Docker-Docker部署常见应用(MySQL、Tomcat、Nginx、Redis、Centos)
    前提须知:(1)搜索镜像命令格式:dockersearch镜像名(2)设置Docker镜像加速器详见文章:Docker设置ustc的镜像源(镜像加速器)1、部署MySQL拉取镜像(这里拉取mysql5.7版本)[root@localhost~]#dockerpullmysql:5.7创建容器(默认运行)[root@localhost~]#dockerrun-di--name=my_mysql-p330......
  • Nginx Location 基本配置
    基本语法格式:Locationblock的基本语法形式是:  location[=|~|~*|^~|@]pattern{...}[=|~|~*|^~|@]被称作locationmodifier,这会定义Nginx如何去匹配其后的pattern,以及该pattern的最基本的属性(简单字符串或正则表达式)location的匹配符1.等于匹配符:=......
  • nginx访问日志
    访客日志处理日志模块的官网教程https://nginx.org/en/docs/http/ngx_http_log_module.html创建nginx访问日志日志对于程序员很重要,可用于问题排错,记录程序运行状态,一个好的日志能够给与精确的问题定位。Nginx日志功能需要在nginx.conf中打开相关指令log_format,设置日志格式,......
  • nginx虚拟主机实战
    nginx虚拟主机实战基于nginx部署网站 虚拟主机指的就是一个独立的站点,具有独立的域名,有完整的www服务,例如网站、FTP、邮件等。Nginx支持多虚拟主机,在一台机器上可以运行完全独立的多个站点。一、为什么配置虚拟主机一些草根流量站长,常会搭建个人站点进行资源分享交流,并且......
  • 轮询 (nginx)理解
    原文链接:https://blog.csdn.net/lrtcsdn/article/details/93780545/轮询(Polling)是一种CPU决策如何提供周边设备服务的方式,又称"程序输入"(ProgrammedI/O)。轮询法的概念是:由CPU定时发出询问,依询问每一个周边设备是否需要其他服务,由即给予服务,服务结束后在问一个周边,接着不断周而复......
  • nginx基础
    Web服务器常指的是(worldwideweb,www)服务器、也是HTTP服务器,主要用于提供网上信息浏览。我们大部分人接触互联网,都基本上是通过浏览器访问互联网中各种资源。Web网络服务是一种被动访问的服务程序,即只有接收到互联网中其他主机发出的请求后才会响应,最终用于提供服务程序的We......
  • nginx 文件下载conf
    server{listen8088;server_namelocalhost;gzipon;gzip_staticon;#需要http_gzip_static_module模块gzip_min_length1k;gzip_comp_level4;gzip_proxiedany;gzip_typestext/plaintext/xmltext/css;gzip_varyon;gzip_dis......
  • Tengine 安装 nginx-module-vts 模块
    Tengine安装nginx-module-vts模块使用Tengine作为反向代理服务器,发现Tengine日志中接口请求过慢,需要绘制grafana展示详细的接口情况解决思路第一版解决思路,修改Tengine中accesslog日志格式,转行为json写入elk中,grafana从elk中获取日志信息绘图access......