簡體   English   中英

MySQL無法在XAMP和HeidiSQL上啟動

[英]MySQL not starting on XAMP and HeidiSQL

我無法使用XAMPP啟動MySQL,也沒有出現任何錯誤。 因此,如果單擊“開始”, 則會收到消息“ 01:26:41 [mysql]嘗試啟動MySQL服務... ”,僅此而已。

問題可能是因為我還安裝了MariaDB隨附的HeidiSQL。 我知道他們兩個都使用相同的端口(3306),並且我嘗試將MariaDB的端口更改為3308。

這是my.ini的內容:

[mysqld]
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql" 
tmpdir = "C:/xampp/tmp" 
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
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"

datadir=C:/Program Files/MariaDB 10.3/data
port=3308
innodb_buffer_pool_size=2033M
character-set-server=utf8
[client]
port=3308
plugin-dir=C:/Program Files/MariaDB 10.3/lib/plugin

mysql_error.log

2019-07-24  1:18:11 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-24  1:18:11 0 [Note] InnoDB: Uses event mutexes
2019-07-24  1:18:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-24  1:18:11 0 [Note] InnoDB: Number of pools: 1
2019-07-24  1:18:11 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-24  1:18:11 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-07-24  1:18:11 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-24  1:18:11 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1791378
2019-07-24  1:18:11 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-24  1:18:11 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-07-24  1:18:11 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-24  1:18:11 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-24  1:18:11 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-07-24  1:18:11 0 [Note] InnoDB: Waiting for purge to start
2019-07-24  1:18:11 0 [Note] InnoDB: 10.3.16 started; log sequence number 1791387; transaction id 163
2019-07-24  1:18:11 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-07-24  1:18:11 0 [Note] InnoDB: Buffer pool(s) load completed at 190724  1:18:11
2019-07-24  1:18:11 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-07-24  1:18:11 0 [Note] Server socket created on IP: '::'.
2019-07-24  1:18:11 0 [Note] Reading of all Master_info entries succeeded
2019-07-24  1:18:11 0 [Note] Added new Master_info '' to hash table
2019-07-24  1:18:11 0 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '10.3.16-MariaDB'  socket: ''  port: 3307  mariadb.org binary distribution

我已經嘗試了所有關於這些問題的答案但是沒有一個對我有用。

不僅XAMPP,我什至無法與HeidiSQL建立連接。 錯誤消息是:

無法連接到“ 127.0.0.1”上的MySQL服務器(10061)

我已經卸載了XAMPP和HeidiSQL並重新安裝了它們。 即使那樣也沒有幫助。 任何幫助,將不勝感激!

HeidiSQL只會通過端口3306連接到您的MySQL實例,但是它不會監聽任何端口,因此它不會使用您所說的任何端口。

因此,您的問題是無法啟動的MySQL服務。

您的my.ini好像已經在運行兩個服務:

  • 一個來自C:\\ Program Files \\ MariaDB 10.3 \\
  • 一個來自C:\\ xampp \\ mysql \\

在服務控制面板中查看,例如通過從開始菜單運行services.msc 然后,注意名為“ MySQL”或“ MariaDB”的服務,或其中包含某些版本號的服務。

my.ini的[mysqld]部分包含兩個端口定義,這可能意味着Xamp / MySQL仍然需要端口3306,而忽略了后面的3308。這再次說明了如果MariaDB服務仍在運行,為什么服務無法啟動。

對於安裝MariaDB的意圖一無所知,我建議將其卸載,或者至少將service startup選項更改為manually

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM