Monday, May 13, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1472  / 1 Year ago, mon, december 12, 2022, 1:29:25

I'm not sure what's happening but it's since a while that I'm experiencing using my dev site (running on a VM) on the local Ubuntu machine.
The site runs on a Wordpress instance using MySQL setup to use innodb table on a separate folder.
I don't have permission problems, as far as I know.



It I try to use MySQL CLI I can query the database without problems; the same using phpmyadmin.
But when it comes to access via the site it takes ages and more often than not I need to stop the service.



And that's again another symptom something doesn't work as it should.
Stopping the service via sudo service mysql stop I can see it immediately stops (phpmyadmin can't log in anymore) but the command line prompt keep on hold like it is working.
The only way I have to get the CLI ready is to brutally stop the service with a CTRL+C.



Any idea of what's wrong?
Thanks


More From » command-line

 Answers
1

As suggested from @Oli in the other other it was a matter of DNS and name resolution. However, it was not in the same direction as he suggested.



It turned out to be that MySQL was trying to do IP resolution on each call, causing a DNS lookup. Because the db server is internal and had no connection to the outside world, the lookup would eventually timeout.



I resolved the problem by adding the skip-name-resolve directive in the my.conf SQL configuration file located beneath /etc/mysql of my VM.



Now my local WP rocks.


[#24687] Tuesday, December 13, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alliulet

Total Points: 46
Total Questions: 109
Total Answers: 97

Location: Svalbard and Jan Mayen
Member since Sat, Oct 10, 2020
4 Years ago
;