lamp平台部署phpmyadmin
1. PhpMyAdmink简介
phpMyAdmin 是一个以PHP为基础,以Web-Base方式架构在网站主机上的MySQL的数据库管理工具,让管理者可用Web接口管理MySQL数据库
2. PhpMyAdmink特征
直观的网页界面
- 支持大多数 MySQL 功能:
- 从 CSV 和 SQL 导入数据
- 将数据导出为各种格式:CSV、SQL、XML、PDF、ISO/IEC 26300 - OpenDocument Text and Spreadsheet、Word、L一个TEX 及其他
- 管理多个服务器
- 以各种格式创建数据库布局的图形
- 使用逐例查询 (QBE) 创建复杂查询
- 在数据库或其子集中进行全局搜索
- 使用一组预定义的函数将存储的数据转换为任何格式,例如将 BLOB 数据显示为图像或下载链接
3. 环境需求
需要已经搭建完成的lamp架构
4. PhpMyAdmink部署
//先下载安装包
[root@z1 ~]# wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip
//解压包
[root@z1 ~]# unzip phpMyAdmin-5.2.0-all-languages.zip
[root@z1 ~]# ls phpMyAdmin-5.2.0-all-languages
babel.config.json examples package.json templates
ChangeLog favicon.ico README themes
composer.json index.php RELEASE-DATE-5.2.0 url.php
composer.lock js robots.txt vendor
config.sample.inc.php libraries setup yarn.lock
CONTRIBUTING.md LICENSE show_config_errors.php
doc locale sql
//把安装包的所有文件导入此目录下
[root@z1 htdocs]# rm -rf /usr/local/apache/htdocs/zzz/index.php
[root@z1 ~]# mv phpMyAdmin-5.2.0-all-languages/* /usr/local/apache/htdocs/zzz/
[root@z1 ~]# ls /usr/local/apache/htdocs/zzz/
babel.config.json examples package.json templates
ChangeLog favicon.ico README themes
composer.json index.php RELEASE-DATE-5.2.0 url.php
composer.lock js robots.txt vendor
config.sample.inc.php libraries setup yarn.lock
CONTRIBUTING.md LICENSE show_config_errors.php
doc locale sql
//授权mysql远程用户
[root@z1 ~]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all on *.* to "root"@"%" identified by '123456';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)
mysql> select user,host from mysql.user;
+---------------+-----------+
| user | host |
+---------------+-----------+
| root | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)
mysql> quit
Bye
[root@z1 ~]# systemctl restart httpd
测验