【问题标题】:localhost:8080/ works well but localhost:8080/phpmyadmin won't openlocalhost:8080/ 运行良好,但 localhost:8080/phpmyadmin 无法打开
【发布时间】:2016-10-05 06:37:20
【问题描述】:

我正在使用 Windows10 并尝试从 localhost 访问 phpmyadmin。 我正在使用 xampp。 我在 htdocs/webservice 中创建了一个 index.php。 apache的端口号是8080,mysql是3306。

http://localhost:8080/webservice/ 工作正常。 但http://localhost:8080/phpmyadmin 没有。

我已经尝试了其他 stackoverflow 建议,但我似乎找不到问题..

下面是我的日志

Version: '10.1.8-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
2016-06-06 00:54:49 2b08 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-06-06  0:54:49 11016 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-06-06  0:54:49 11016 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-06  0:54:49 11016 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-06-06  0:54:49 11016 [Note] InnoDB: Memory barrier is not used
2016-06-06  0:54:49 11016 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-06  0:54:49 11016 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-06  0:54:49 11016 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-06-06  0:54:49 11016 [Note] InnoDB: Completed initialization of buffer pool
2016-06-06  0:54:49 11016 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-06  0:54:49 11016 [Note] InnoDB: The log sequence numbers 1835037 and 1835037 in ibdata files do not match the log sequence number 1835738 in the ib_logfiles!
2016-06-06  0:54:49 11016 [Note] InnoDB: Database was not shutdown normally!
2016-06-06  0:54:49 11016 [Note] InnoDB: Starting crash recovery.
2016-06-06  0:54:49 11016 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-06-06  0:54:49 11016 [Note] InnoDB: Restoring possible half-written data pages 
2016-06-06  0:54:49 11016 [Note] InnoDB: from the doublewrite buffer...
2016-06-06  0:54:49 11016 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-06  0:54:49 11016 [Note] InnoDB: Waiting for purge to start
2016-06-06  0:54:49 11016 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835738
2016-06-06  0:54:49 11528 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-06-06  0:54:49 11016 [Note] Plugin 'FEEDBACK' is disabled.
2016-06-06  0:54:49 11016 [Note] Recovering after a crash using tc.log
2016-06-06  0:54:49 11016 [Note] Starting crash recovery...
2016-06-06  0:54:49 11016 [Note] Crash recovery finished.
2016-06-06  0:54:49 11016 [Note] Server socket created on IP: '::'.
2016-06-06  0:54:49 11016 [Note] Event Scheduler: Loaded 0 events
2016-06-06  0:54:49 11016 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
2016-06-06 00:56:20 3bc8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-06-06  0:56:20 15304 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-06-06  0:56:20 15304 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-06  0:56:20 15304 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-06-06  0:56:20 15304 [Note] InnoDB: Memory barrier is not used
2016-06-06  0:56:20 15304 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-06  0:56:20 15304 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-06  0:56:20 15304 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-06-06  0:56:20 15304 [Note] InnoDB: Completed initialization of buffer pool
2016-06-06  0:56:20 15304 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-06  0:56:20 15304 [Note] InnoDB: The log sequence numbers 1835037 and 1835037 in ibdata files do not match the log sequence number 1835748 in the ib_logfiles!
2016-06-06  0:56:20 15304 [Note] InnoDB: Database was not shutdown normally!
2016-06-06  0:56:20 15304 [Note] InnoDB: Starting crash recovery.
2016-06-06  0:56:21 15304 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-06-06  0:56:21 15304 [Note] InnoDB: Restoring possible half-written data pages 
2016-06-06  0:56:21 15304 [Note] InnoDB: from the doublewrite buffer...
2016-06-06  0:56:21 15304 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-06  0:56:21 15304 [Note] InnoDB: Waiting for purge to start
2016-06-06  0:56:21 15304 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835748
2016-06-06  0:56:21 5536 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-06-06  0:56:21 15304 [Note] Plugin 'FEEDBACK' is disabled.
2016-06-06  0:56:21 15304 [Note] Recovering after a crash using tc.log
2016-06-06  0:56:21 15304 [Note] Starting crash recovery...
2016-06-06  0:56:21 15304 [Note] Crash recovery finished.
2016-06-06  0:56:21 15304 [Note] Server socket created on IP: '::'.
2016-06-06  0:56:21 15304 [Note] Event Scheduler: Loaded 0 events
2016-06-06  0:56:21 15304 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB'  socket: ''  port: 8080  mariadb.org binary distribution
2016-06-06 00:58:51 211c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-06-06  0:58:51 8476 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-06-06  0:58:51 8476 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-06  0:58:51 8476 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-06-06  0:58:51 8476 [Note] InnoDB: Memory barrier is not used
2016-06-06  0:58:51 8476 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-06  0:58:51 8476 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-06  0:58:51 8476 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-06-06  0:58:51 8476 [Note] InnoDB: Completed initialization of buffer pool
2016-06-06  0:58:51 8476 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-06  0:58:51 8476 [Note] InnoDB: The log sequence numbers 1835037 and 1835037 in ibdata files do not match the log sequence number 1835758 in the ib_logfiles!
2016-06-06  0:58:51 8476 [Note] InnoDB: Database was not shutdown normally!
2016-06-06  0:58:51 8476 [Note] InnoDB: Starting crash recovery.
2016-06-06  0:58:51 8476 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-06-06  0:58:51 8476 [Note] InnoDB: Restoring possible half-written data pages 
2016-06-06  0:58:51 8476 [Note] InnoDB: from the doublewrite buffer...
2016-06-06  0:58:51 8476 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-06  0:58:51 8476 [Note] InnoDB: Waiting for purge to start
2016-06-06  0:58:51 8476 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835758
2016-06-06  0:58:51 3104 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-06-06  0:58:51 8476 [Note] Plugin 'FEEDBACK' is disabled.
2016-06-06  0:58:51 8476 [Note] Recovering after a crash using tc.log
2016-06-06  0:58:51 8476 [Note] Starting crash recovery...
2016-06-06  0:58:51 8476 [Note] Crash recovery finished.
2016-06-06  0:58:51 8476 [Note] Server socket created on IP: '::'.
2016-06-06  0:58:51 8476 [Note] Event Scheduler: Loaded 0 events
2016-06-06  0:58:51 8476 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB'  socket: ''  port: 8080  mariadb.org binary distribution

【问题讨论】:

  • 检查您的网络服务器错误日志以获取提示(这是您的 MySQL 日志)。另请查看您的 Apache 配置文件。 XAMPP 通过配置做了一些非标准的事情,但我认为默认是监听端口 80(所以 localhost/phpmyadmin 而不是你正在尝试的)。另外,admin/start 页面上没有直接启动 phpMyAdmin 的链接吗?这是否有效或给你一个错误页面?

标签: php mysql apache web-services phpmyadmin


【解决方案1】:

转到 xampp 中的 phpMyAdmin 目录。您将找到 config.inc.php 文件。现在改变这一行:

$cfg['Servers'][$i]['host'] = '127.0.0.1';

$cfg['Servers'][$i]['host'] = '127.0.0.1:8080'; 

接下来你必须重启你的服务器。

【讨论】:

  • 'host' 是 MySQL 主机的配置指令,而不是监听 HTTP 连接,并且要更改 MySQL 端口,有一个 $cfg['Servers'][$i]['port'] 指令,所以这似乎不正确。
猜你喜欢
  • 2017-02-08
  • 2015-05-20
  • 2015-10-27
  • 1970-01-01
  • 2017-10-08
  • 1970-01-01
  • 2014-01-28
  • 2019-11-24
  • 2017-09-07
相关资源
最近更新 更多