I'm migrating my production wordpress website to my local environment on Laragon. I did the following:
Opened Laragon's Terminal:
Menu > Laragon > Terminal
Ran this command:
scp user@your-remote-host:/dump.sql C:/laragon/tmp/dump.sql
Imported sql-dump to my local database:
mysql -u root -p your-database < C:\laragon\tmp\dump.sql
Then I cloned my git repo to the root at C:\Laragon\www\
Started it up and at first it displayed a replica of the live server's homepage, but gave an error when attempting to go to another page.
I stopped all services and when I restarted I was given the error ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded
Then when I tried to do mysql -u root -p
from the terminal I received the same error.
With the services started the web page now showed 'error establishing database' and displayed the Error 1524
Here is the output of my.ini
file which is the same as my.cnf
[client]
#password=your_password
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
key_buffer_size=256M
max_allowed_packet=512M
table_open_cache=256
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=4M
myisam_sort_buffer_size=64M
thread_cache_size=8
datadir= "C:/laragon/data/mysql"
plugin-load-add = auth_socket.so
secure-file-priv=""
explicit_defaults_for_timestamp=1
datadir= "C:/laragon/data/mysql"
[mysqldump]
quick
max_allowed_packet=512M
unix_socket
, aka auth_socket
is non-windows authentication plugin.
I'd start with the variable skip-grant-tables set, and change the root authentication using:
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("verysecret")
Then remove the 'skip-grant-tables' option and restart.