18.1、[root@web01 nginx]# mysql -uroot -p123456

mysql> show databases; #显示所有的数据库;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| test |

+--------------------+

4 rows in set (0.00 sec)

mysql> drop databases test; #删除test数据库;drop user 用户名@ localhost; #删除用户;

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

+--------------------+

3 rows in set (0.00 sec)

mysql> create database wordpress; #创建wordpress数据库;

Query OK, 1 row affected (0.00 sec)

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| wordpress |

+--------------------+

4 rows in set (0.00 sec)

mysql> select user(); #查看登录到mysql数据库的当前用户;

+----------------+

| user() |

+----------------+

| root@localhost |

+----------------+

1 row in set (0.10 sec)

mysql> select user,host from mysql.user; #查看mysql数据库中所有的用户所能连接的网络范围;

+------+-----------+

| user | host |

+------+-----------+

| root | 127.0.0.1 |

| root | ::1 |

| | localhost |

| root | localhost |

| | web01 |

| root | web01 |

+------+-----------+

6 rows in set (0.00 sec)

mysql> grant all on wordpress.* to wordpress@'localhost' identified by '123456';

#grant授权、all所有的权限、 *所有的库、.*所有表、哪个用户可以访问,访问的主机(只能从本机进行连接)、用户的密码;

mysql> select user,host from mysql.user;

+-----------+-----------+

| user | host |

+-----------+-----------+

| root | 127.0.0.1 |

| root | ::1 |

| | localhost |

| root | localhost |

| wordpress | localhost |

| | web01 |

| root | web01 |

+-----------+-----------+

7 rows in set (0.00 sec)

mysql> show grants for wordpress@'localhost';#查看用户的权限;

+------------------------------------------------------------------------------------------------------------------+

| Grants for wordpress@localhost |

+------------------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |

| GRANT ALL PRIVILEGES ON `wordpress`.* TO 'wordpress'@'localhost' |

+------------------------------------------------------------------------------------------------------------------+

2 rows in set (0.00 sec)

mysql> flush privileges; #刷新用户的权限;

Query OK, 0 rows affected (0.00 sec)

18.2、下载worpress软件:

[root@web01 tools]# wget https://cn.wordpress.org/wordpress-4.5.1-zh_CN.tar.gz

[root@web01 tools]# tar -xzvf wordpress-4.5.1-zh_CN.tar.gz

18.3、安装并赋予权限:

[root@web01 tools]# cp -av wordpress/* /application/nginx/html/php/

[root@web01 tools]# chown -R nginx:nginx /application/nginx/html/php/

[root@web01 tools]# ls -ld /application/nginx/html/php/

drwxr-xr-x 5 nginx nginx 4096 11月 22 14:08 /application/nginx/html/php/

18.4、在windows的hosts文件中输入:

172.16.1.8 www.php.com

18.5、在浏览器中输入www.php.com进行测试:

18.6、提交后查看配置:

[root@web01 php]# pwd

/application/nginx/html/php

[root@web01 php]# cat wp-config.php

<?php

/**

* WordPress基础配置文件。

*

* 这个文件被安装程序用于自动生成wp-config.php配置文件,

* 您可以不使用网站,您需要手动复制这个文件,

* 并重命名为“wp-config.php”,然后填入相关信息。

*

* 本文件包含以下配置选项:

*

* * MySQL设置

* * 密钥

* * 数据库表名前缀

* * ABSPATH

*

* @link https://codex.wordpress.org/zh-cn:%E7%BC%96%E8%BE%91_wp-config.php

*

* @package WordPress

*/

// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //

/** WordPress数据库的名称 */

define('DB_NAME', 'wordpress');

/** MySQL数据库用户名 */

define('DB_USER', 'wordpress');

/** MySQL数据库密码 */

define('DB_PASSWORD', '123456');

/** MySQL主机 */

define('DB_HOST', 'localhost');

/** 创建数据表时默认的文字编码 */

define('DB_CHARSET', 'utf8mb4');

/** 数据库整理类型。如不确定请勿更改 */

define('DB_COLLATE', '');

18.7、进行安装:

18.8、设置网站登录密码:

18.9、安装wordpress:

18.10、进入库中查看表:

[root@web01 tools]# mysql -uroot -p123456

mysql> use wordpress; #从root用户切换到wordpress用户;

Database changed

mysql> show tables; #这里的lc_前缀即是前面设置的表前缀;

+-----------------------+

| Tables_in_wordpress |

+-----------------------+

| lc_commentmeta |

| lc_comments |

| lc_links |

| lc_options |

| lc_postmeta |

| lc_posts |

| lc_term_relationships |

| lc_term_taxonomy |

| lc_termmeta |

| lc_terms |

| lc_usermeta |

| lc_users |

+-----------------------+

12 rows in set (0.00 sec)

18.11、登录wordpress后台管理界面:

18、lnmp_wordpress安装的更多相关文章

  1. Ubuntu 18.04 安装MySQL

    最近在写东西的时候,需要用到MySQL,在网上查了一下,都说Ubuntu18.04不能安装MySQL5.7.22, 总觉的不可能,所以自己就研究了一下,然后分享给大家 工具/原料   VMware W ...

  2. Ubuntu 18.04 安装博通(Broadcom)无线网卡驱动

    目录 Ubuntu 18.04 安装博通(Broadcom)无线网卡驱动 Package gcc is not configured yet. 解决办法 history history | grep ...

  3. 在Ubuntu 18.04 安装 MySQL 8.0

    在Ubuntu 18.04 安装 MySQL 8.0 ① 登入 mysql 官网,在官网中下载 deb 包,点击该链接,即可下载. https://dev.mysql.com/downloads/re ...

  4. windows10下 MySQL5.7.18版本安装过程及遇到的问题

    windows10下 MySQL5.7.18版本安装过程及遇到的问题           mysql-5.7.18-winx64 安装           1.解压 此次将MySQL装在H盘,依个人喜 ...

  5. Ubuntu 18.04 安装部署Net Core、Nginx全过程

    Ubuntu 18.04 安装部署Net Core.Nginx全过程 环境配置 Ubuntu 18.04 ,Nginx,.Net Core 2.1, Let's Encrypt 更新系统 sudo a ...

  6. Ubuntu 18 + Redis安装

    Ubuntu 18 + Redis安装 1.安装命令: opengis@gisserver20:~$ sudo apt-get install redis-server 2.查看tcp 连接 open ...

  7. Ubuntu 18.04 安装和常用软件安装

    Ubuntu 18.04 安装 下载 Ubuntu 制作 U 盘启动盘 设置电脑为 U 盘启动 插入 U 盘,重启电脑 按照提示安装 Ubuntu 更新 NVIDIA 显卡和 Broadcom 无线网 ...

  8. Linux rhel7 下MySQL5.7.18详细安装文档

    Linux rhel7 下MySQL5.7.18详细安装文档 本文安装MySQL5.7使用的是vm虚拟机rhel7操作系统 ,ftp文件传输是FileZilla3.27,远程连接xssh5.0 1 登 ...

  9. Ubuntu 18.04安装MongoDB 4.0(社区版)

    Ubuntu 18.04(虚拟机VirtualBox上),MongoDB 4.0, 听室友说,23点有世界杯决赛呢!可是,孤要写博文的啊!以记录这忙乱的下午和晚间成功安装了一个软件到Linux上.—— ...

  10. 真实机下 ubuntu 18.04 安装GPU +CUDA+cuDNN 以及其版本选择(亲测非常实用)【转】

    本文转载自:https://blog.csdn.net/u010801439/article/details/80483036 ubuntu 18.04 安装GPU +CUDA+cuDNN : 目前, ...

随机推荐

  1. [刷题] PTA 02-线性结构3 Reversing Linked List

    链表逆序 1 #include<iostream> 2 #include<stdio.h> 3 #include<algorithm> 4 using namesp ...

  2. Shell $?获取函数返回值或者上一个命令的退出状态

    Shell $?获取函数返回值或者上一个命令的退出状态 来自:互联网 时间:2021-01-12 阅读:2 $? 是一个特殊变量,用来获取上一个命令的退出状态,或者上一个函数的返回值. 所谓退出状态, ...

  3. 有没有一种组合字体,中文是宋体,英文是times new roman?

    有没有一种组合字体,中文是宋体,英文是times new roman? 由于日常科研工作书写需要,想问问各位大神有没有一种字体,中文是宋体,西文是times new roman,这样写论文好方便啊有没 ...

  4. stm32之ADC应用实例(单通道、多通道、基于DMA)-转载精华帖,最后一部分的代码是精华

    硬件:STM32F103VCT6    开发工具:Keil uVision4    下载调试工具:ARM仿真器网上资料很多,这里做一个详细的整合.(也不是很详细,但很通俗).所用的芯片内嵌3个12位的 ...

  5. python3 smtplib发送邮件

    使用smtp包发送邮件还依赖email的一些方法 发送邮件主要分为三步: 1,定义邮箱参数:邮箱服务器地址,邮箱用户名,邮箱密码,邮件发送方,邮件接收方,邮件标题,邮件内容 2,配置发送内容 3,实例 ...

  6. WPF 2D图形 Shape入门(一)--Shape

    本文是篇WPF Shape的入门文章 Shape 首先看看shape的继承链关系: 一个Shape具有哪些重要属性: 属性 说明 DefiningGeometry 默认的几何形状 RenderedGe ...

  7. 缩放 transform

    转换属性 transform 转换是css3中的一个特征,可以实现元素的缩放,位移,变形. 作用: 使元素在位置或者形状上发生一定的改变. 属性: transform 属性值: scale:缩放(一般 ...

  8. NNVM AI框架编译器

    NNVM AI框架编译器 深度学习已变得无处不在且不可或缺.看到对在多种平台(例如手机,GPU,IoT设备和专用加速器)上部署深度学习工作负载的需求不断增长.TVM堆栈弥合深度学习框架与面向性能或效率 ...

  9. Spring Security 快速上手

    Spring Security 框架简介 Spring Security 说明 Spring Security 基于 Spring 框架,提供了一套 Web 应用安全性的完整解决方案 关于安全方面的两 ...

  10. .NET Worker Service 作为 Windows 服务运行及优雅退出改进

    上一篇文章我们了解了如何为 Worker Service 添加 Serilog 日志记录,今天我接着介绍一下如何将 Worker Service 作为 Windows 服务运行. 我曾经在前面一篇文章 ...