0

I cannot start MySQL with XAMPP and I do not get any errors. So if I click on "Start", I get the message "01:26:41 [mysql] Attempting to start MySQL service..." and that's it.

The problem may be, because I have also installed HeidiSQL, which comes with MariaDB. I know that both of them use the same port (3306) and I have tried to change the port of MariaDB to 3308.

This is the content of 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

I have tried all answers from that questions but none of them worked for me.

Not only XAMPP, I can't even get a connection with HeidiSQL. The error message is:

Can't connect to MySQL server on '127.0.0.1' (10061)

I have uninstalled both of them, XAMPP and HeidiSQL and installed them again. Even that didn't help. Any help would be appreciated!

Kitt
  • 1
  • 1
  • Does Windows Task Manager show a Background Process of mysqld running? If HeidiSQL includes MariaDB, why the XAMPP involvement? – Wilson Hauck Jul 24 '19 at 17:25
  • @WilsonHauck if I click on "Start" on XAMPP, mysql.exe is not running on Task Manager but if I start the service `MySQL80` (on `services.msc`) and then start the connection with HeidiSQL, I see in Task Manager that mysql.exe is listed twice. – Kitt Jul 24 '19 at 20:43
  • Disclaimer: I am the content author of website mentioned in my profile, Network profile with contact information, if you make contact, will try to assist. This is not a one question/one answer type of situation that can be answered on SO, too many parts are involved. – Wilson Hauck Jul 24 '19 at 23:30

1 Answers1

0

HeidiSQL would just connect over port 3306 to your MySQL instance, but it does not listen to any port, so it does not use any port as you say.

So your problem is the non-starting MySQL service.

Your my.ini looks as if you already have two services running:

  • one from C:\Program Files\MariaDB 10.3\
  • and one from C:\xampp\mysql\

Have a look in your services control panel, e.g. by running services.msc from your start menu. Then, watch out for services named "MySQL" or "MariaDB", or one with some version number in it.

Your my.ini contains two port definitions in the [mysqld] section, which could mean your Xamp/MySQL still wants port 3306, ignoring the later 3308. That again would explain why your service does not start, if your MariaDB service still runs.

Not knowing anything about the intention for installing MariaDB, I'd recommend to uninstall it, or at least change the service startup option to manually:

enter image description here

Anse
  • 1,573
  • 12
  • 27
  • 1
    Thanks Anse. By running `services.msc`, I see that I have `MySQL` and `MySQL80`. I have changed the Starttypes for both of them to `Manual` and now HeidiSQL gets connected but XAMPP remains the same and still can't get connected. – Kitt Jul 24 '19 at 20:26
  • One of both services still runs - otherwise HeidiSQL would not connect. Probably restart your pc once. – Anse Jul 26 '19 at 10:55
  • True, `MySQL80` runs. I can't run the other service, since I get the message that the service `MySQL` can't get started on a "local computer" and also I get an error that the system can't find the file. Maybe this is why MySQL in XAMPP can't get connected. – Kitt Jul 26 '19 at 12:38
  • Your both MySQL services are using port 3306, so the second one fails. Just set a different port for one of them, and remove the duplicated port setting. – Anse Jul 26 '19 at 17:50
  • Not really, because if I start the connection with HeidiSQL, I am using the port 3308 and it gets connected. – Kitt Jul 26 '19 at 18:06