启动时XAMPP和MySQL错误

时间:2014-08-17 19:04:21

标签: mysql xampp

当我尝试通过XAMPP控制面板启动MySQL服务时出现此错误:

2014-08-17 14:53:44 6028 [ERROR] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2014-08-17 14:53:44 6028 [ERROR] Aborting

之前有人遇到过这个问题,并且有一个配置更改可能会让它运行吗?

作为参考,这些是my.ini中的设置:

[client] 
port            = 3306
socket          = "G:/Dev/xampp/mysql/mysql.sock"

# The MySQL server
[mysqld]
port= 3306
socket = "G:/Dev/xampp/mysql/mysql.sock"
basedir = "G:/Dev/xampp/mysql" 
tmpdir = "G:/Dev/xampp/tmp" 
datadir = "G:/Dev/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
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"
# SECURITY CHANGES
skip-networking
local-infile=0

plugin_dir = "G:/Dev/xampp/mysql/lib/plugin/" 

skip-federated

server-id   = 1

innodb_data_home_dir = "G:/Dev/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "G:/Dev/xampp/mysql/data"
innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 32M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50
innodb_thread_concurrency   = 16
innodb_flush_method = normal

[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

2 个答案:

答案 0 :(得分:2)

通过删除选项enable-named-pipe

之前的注释来启用命名管道
pid_file = "mysql.pid"
enable-named-pipe           # this line
key_buffer = 16M 

或者让mysql通过注释掉skip-networking选项来侦听TCP / IP端口:

# SECURITY CHANGES
# skip-networking           # this line

如果禁用网络并且未启用命名管道,那么mysqld将无用。

答案 1 :(得分:0)

在Windows上使用mysql 8时,如果您尝试从带有skip-grant-tables的命令行启动它,则会打this error。 解决方案是添加共享内存。

.\mysqld --skip-grant-tables --shared-memory