dqsxsmi3704 2015-07-14 04:57
浏览 159

XAMPP中的MySQL超时

I have XAMPP installed on Microsoft Windows Server 2003. I have a PHP application in xampp/htdocs directory. I have started the Apache and MySQL instances.

I have noticed that every morning, my application gives a MySQL Error when I try to log in to my application. This is fixed after restarting MySQL instance in XAMPP control panel on the server. I think this may be due to timeout. How do I prevent timeout?

This is the my.ini:

[client] 
port            = 3306 
socket          = "D:/xampp/mysql/mysql.sock"
[mysqld]
port= 3306
socket = "D:/xampp/mysql/mysql.sock"
basedir = "D:/xampp/mysql" 
tmpdir = "D:/xampp/tmp" 
datadir = "D:/xampp/mysql/data"
pid_file = "mysql.pid"
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"
plugin_dir = "D:/xampp/mysql/lib/plugin/" 

skip-federated

server-id   = 1

innodb_data_home_dir = "D:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "D:/xampp/mysql/data"
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

This is the error I come across every morning before restarting MySQL on XAMPP:

Warning: mysql_pconnect(): MySQL server has gone away in D:\MyApplication\mysql.inc on line 432

Warning: mysql_pconnect(): Link to server lost, unable to reconnect in D:\MyApplication\mysql.inc on line 432
Fatal Error: Failed to connect to database
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 运筹学中在线排序的时间在线排序的在线LPT算法
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 lammps拉伸应力应变曲线分析
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
    • ¥30 python代码,帮调试,帮帮忙吧