Can't connect to server on 'localhost' (10061) - Windows 10 MariaDB 11.2
I have searched for a solution to this issue without success. Background - Very new to MariaDB, migrating from Access. I attempted to migrate the MariaDB database(s) from the default datadir (C:\Program Files\MariaDB 11.2\data) to drive E (E:\MariaDB\Data) by changing the "my.ini" file "datadir=" line. To be clear, I first exited dbForge Studio for MySQL and HeidiSQL (both of which I have been using to explore, create, modify test databases) before starting this process. I copied the database folders to the newly created directory on E:, then saved the original "my.ini" file as "my.ini.original", then edited the .ini file and saved the edited .ini file as "my.ini" (all in C:\Program Files\MariaDB 11.2\data), then stopped mysql.exe from Task Manager. BTW, stopping "mysql.exe" in Task Manager completely removed it from the services list, which I did not expect. I thought it would just "stop" but in fact was removed from the list. I am actually operating remotely via Chrome Remote Desktop but AFAIK this has never been an issue with MariaDB or any other programs that I run.
When I attempted to restart mysql from the default bin folder, I got that error msg. I replaced the edited my.ini file with the original (by renaming both), but still received the same error. I am logged in as Administrator and have checked Admin privileges of all relevant folders and have full control. I tried starting mysql.exe and mariadb.exe from the bin folder as well as from a command prompt (as Administrator). On command line, I get "ERROR 2002 (HY000): Can't connect to server on 'localhost' (10061)". I have not rebooted the PC. That is something I will try but since I am connected by Chrome Remote Desktop, I'm not sure that I will be able to reconnect. That will put further testing off until I am back in the office tomorrow.
I'm sure this is something simple, but I am at a loss at this point. I appreciate any assistance any one can provide.
BTW, the error log file in the "new" directory shows the following after the attempt to restart mysql.exe:
2024-01-15 11:52:45 0 [Note] Starting MariaDB 11.2.2-MariaDB source revision 929532a9426d085111c24c63de9c23cc54382259 as process 904 2024-01-15 11:52:45 0 [Note] InnoDB: Compressed tables use zlib 1.3 2024-01-15 11:52:45 0 [Note] InnoDB: Using transactional memory 2024-01-15 11:52:45 0 [Note] InnoDB: Number of transaction pools: 1 2024-01-15 11:52:45 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2024-01-15 11:52:45 0 [Note] InnoDB: Initializing buffer pool, total size = 95.824GiB, chunk size = 1.497GiB 2024-01-15 11:52:45 0 [Note] InnoDB: Completed initialization of buffer pool 2024-01-15 11:52:47 0 [Note] InnoDB: File system buffers for log disabled (block size=4096 bytes) 2024-01-15 11:52:47 0 [Note] InnoDB: End of log at LSN=62431194948 2024-01-15 11:52:47 0 [Note] InnoDB: Opened 3 undo tablespaces 2024-01-15 11:52:47 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active. 2024-01-15 11:52:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... 2024-01-15 11:52:47 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. 2024-01-15 11:52:47 0 [Note] InnoDB: log sequence number 62431194948; transaction id 12187 2024-01-15 11:52:47 0 [Note] Plugin 'FEEDBACK' is disabled. 2024-01-15 11:52:47 0 [Note] InnoDB: Loading buffer pool(s) from E:\MariaDB\Data\ib_buffer_pool 2024-01-15 11:52:47 0 [Note] mariadbd.exe: SSPI: using principal name 'localhost', mech 'Negotiate' 2024-01-15 11:52:47 0 [Note] Server socket created on IP: '::'. 2024-01-15 11:52:47 0 [Note] Server socket created on IP: '0.0.0.0'. 2024-01-15 11:52:47 0 [Note] mariadbd.exe: Event Scheduler: Loaded 0 events 2024-01-15 11:52:47 0 [Note] C:\Program Files\MariaDB 11.2\bin\mariadbd.exe: ready for connections. Version: '11.2.2-MariaDB' socket: '' port: 3306 mariadb.org binary distribution 2024-01-15 11:52:52 0 [Note] InnoDB: Buffer pool(s) load completed at 240115 11:52:52 2024-01-15 11:53:00 0 [Note] console_event_handler: received CTRL_CLOSE_EVENT event, terminating
Answer
ANSWERED: I decided to bite the bullet and reboot remotely after insuring that Chrome Remote Desktop was in the Startup folder. Rebooting with the original "my.ini" file restored the original connection, and after switching to the new "my.ini" with the new folder location, rebooting again linked MariaDB to the new location. So, as often is the case, rebooting will cure many ills. I assume that some setting remained in the Registry (or other location) that was not purged or changed by exiting and restarting.