0

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

1 Answer 1

2

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.

3
  • when I try to access mysql from terminal I get the same error as when I try to access localhost on web browser. Here's a screenshot of my terminal imgur.com/PYxYTLv How can I run the sql command if I can't access the mysql command line Commented Jun 3, 2020 at 15:43
  • any ideas pretty stuck here? Commented Jun 4, 2020 at 4:51
  • 2
    mysqld_safe --skip-grant-tables, opps, is a non-windows script so won't work on windows. Stop the mysql service in Windows. add skip-grant-tables into your my.ini file after [mysqld] and remove plugin-load-add=.... Then start the mysql service. Remove skip-grant-tables once ALTER USER has been done.
    – danblack
    Commented Jun 4, 2020 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.