通过sudo apt get install phpmyadmin throws安装phpmyadmin;'的空值;端口';“指定”;错误

通过sudo apt get install phpmyadmin throws安装phpmyadmin;'的空值;端口';“指定”;错误,php,phpmyadmin,ubuntu-16.04,Php,Phpmyadmin,Ubuntu 16.04,这是我得到的错误: Configuring phpmyadmin │ An error occurred while installing the database: mysql: [Warning] mysql: Empty valu

这是我得到的错误:

                     Configuring phpmyadmin 
                                                                            │ 
  An error occurred while installing the database:                            

  mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an     
  error in future versions ERROR 2002 (HY000): Can't connect to local         
  MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) . 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,       

                                  <Ok>   
配置phpmyadmin
│ 
安装数据库时出错:
mysql:[警告]mysql:指定了“端口”的空值。将抛出一个
未来版本错误错误2002(HY000):无法连接到本地
MySQL服务器通过套接字“/var/run/mysqld/mysqld.sock”(2)。你的
选项包括:
*中止-导致操作失败;你需要降级,
重新安装、重新配置此软件包,或以其他方式手动干预
继续使用它。这通常也会影响你的工作能力
安装其他软件包,直到安装故障得到解决。
*重试-再次提示所有配置问题
(包括因debconf优先级而错过的项目)
并再次尝试执行该操作。
*重试(跳过问题)-立即再次尝试该操作,

如何解决?

首先检查您是否可以通过终端登录mysql。如果没有,请尝试重新启动mysql服务。然后再次检查。是否已先安装mysql?请尝试删除所有内容,然后重复安装过程。