Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 720|回复: 0

Ubuntu 16.04 安装 Phpmyadmin 出现的问题及解决

[复制链接]
  • TA的每日心情
    奋斗
    7 天前
  • 签到天数: 803 天

    [LV.10]以坛为家III

    2053

    主题

    2111

    帖子

    72万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    726482
    发表于 2021-5-22 14:17:54 | 显示全部楼层 |阅读模式

    ubuntu 16.04 install phpmyadmin

    • $ apt install phpmyadmin
    • 安装时出现一个错误:
        An error occurred while installing the database:
      │
      │ mysql said: mysql: [Warning] mysql: Empty value for 'port' specified.
      │ Will throw an error in future versions ERROR 1819 (HY000) at line 1:
      │ Your password does not satisfy the current policy requirements . Your
      │ options are:
      │  * abort - Causes the operation to fail; you will need to downgrade,
      │    reinstall, reconfigure this package, or otherwise manually intervene
      │    to continue using it. This will usually also impact your ability to
      │    install other packages until the installation failure is resolved.
      │  * retry - Prompts once more with all the configuration questions
      │    (including ones you may have missed due to the debconf priority
      │    setting) and makes another attempt at performing the operation.
      │  * retry (skip questions) - Immediately attempts the operation again,
      │    skipping all questions. This is normally useful only if you have
      │    solved the underlying problem since the time the error occurred.
      │  * ignore - Continues the operation ignoring dbconfig-common errors.
      │    This will usually leave this package without a functional database.
    
    • 详细信息日志:
        Preconfiguring packages ...
        Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
        Selecting previously unselected package phpmyadmin.
        (Reading database ... 229335 files and directories currently installed.)
        Preparing to unpack .../phpmyadmin_4%3a4.5.4.1-2ubuntu2_all.deb ...
        Unpacking phpmyadmin (4:4.5.4.1-2ubuntu2) ...
        Processing triggers for doc-base (0.10.7) ...
        Processing 1 added doc-base file...
        Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
        Processing triggers for man-db (2.7.5-1) ...
        Setting up phpmyadmin (4:4.5.4.1-2ubuntu2) ...
        Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
        dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    
        Creating config file /etc/dbconfig-common/phpmyadmin.conf with new version
    
        Creating config file /etc/phpmyadmin/config-db.php with new version
        granting access to database phpmyadmin for phpmyadmin@localhost: failed.
        error encountered creating user:
        mysql said: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions ERROR 1819 (HY000) at line 1: Your password does not satisfy the current policy requirements
        dbconfig-common: phpmyadmin configure: aborted.
        dbconfig-common: flushing administrative password
        Automatic configuration using dbconfig-common failed!
    
    • 端口问题通过这篇文章解决了,原因是mysql5.7更改了某些行为,导致phpmyadmin的端口配置失效了。

    • 继续执行,特么又冒出了新的问题:

      An error occurred while installing the database:                           │
      │                                                                            │
      │ mysql said: ERROR 1819 (HY000) at line 1: Your password does not satisfy   │
      │ the current policy requirements . Your options are:                        │
      │  * abort - Causes the operation to fail; you will need to downgrade,       │
      │    reinstall, reconfigure this package, or otherwise manually intervene    │
      │    to continue using it. This will usually also impact your ability to     │
      │    install other packages until the installation failure is resolved.      │
      │  * retry - Prompts once more with all the configuration questions          │
      │    (including ones you may have missed due to the debconf priority         │
      │    setting) and makes another attempt at performing the operation.         │
      │  * retry (skip questions) - Immediately attempts the operation again,      │
      │    skipping all questions. This is normally useful only if you have        │
      │    solved the underlying problem since the time the error occurred.        │
      │  * ignore - Continues the operation ignoring dbconfig-common errors.       │
      │    This will usually leave this package without a functional database.
      
    • 搜索到这篇文章,我看到了这个:

      Assuming that the validate_password plugin is installed, it implements three levels of password checking: LOW, MEDIUM, and STRONG. The default is MEDIUM; to change this, modify the value of validate_password_policy. The policies implement increasingly strict password tests. The following descriptions refer to default parameter values, which can be modified by changing the appropriate system variables.

      LOW policy tests password length only. Passwords must be at least 8 characters long.

      MEDIUM policy adds the conditions that passwords must contain at least 1 numeric character, 1 lowercase character, 1 uppercase character, and 1 special (nonalphanumeric) character.

      STRONG policy adds the condition that password substrings of length 4 or longer must not match words in the dictionary file, if one has been specified.

    • 看着挺眼熟的,哦,想起来了,我在安装mysql的时候运行过mysql_installation_security命令,当时,我还选了LOW选项。也就是说密码必须至少8个字符。

    • 果然重新配置之后,输入了8个字符的密码,就成功了。

    • 成功后的日志记录:
      dbconfig-common: phpmyadmin reconfigure: trying again.
      Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
      dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
      Replacing config file /etc/dbconfig-common/phpmyadmin.conf with new version
      Replacing config file /etc/phpmyadmin/config-db.php with new version
      granting access to database phpmyadmin for phpmyadmin@localhost: success.
      verifying access for phpmyadmin@localhost: success.
      dbconfig-common: dumping mysql database phpmyadmin to /var/tmp/phpmyadmin.phpmyadmin.2017-08-13-14.19.mysql.IwpX34.
      database does not exist.
      dbconfig-common: dropping old mysql database phpmyadmin.
      dropping database phpmyadmin: database does not exist.
      creating database phpmyadmin: success.
      verifying database phpmyadmin exists: success.
      populating database via sql... done.
      dbconfig-common: flushing administrative password

    phpmyadmin的配置文件和项目文件在哪里?

    • /etc/phpmyadmin/apache.conf
    • /etc/phpmyadmin/config.inc.php
    • 突然想到项目目录可以到项目conf文件中去找啊!然后找到了
    • /usr/share/phpmyadmin
    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-11-24 13:36 , Processed in 0.178995 second(s), 27 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表