ayz Posted January 18, 2024 Share Posted January 18, 2024 Hi! Looking for help debugging what went wrong. I have a ProcessWire site hosting remotely on a DigitalOcean droplet, and I wanted to open and edit some files on my local machine. I use Sublime so I installed rsub following these instructions. Then I opened up my site at its usual domain and I see the following error: Oops… Error: Exception: SQLSTATE[HY000] [2002] No such file or directory (in wire/core/WireDatabasePDO.php line 509) #0 wire/core/WireDatabasePDO.php (509): PDO->__construct() #1 wire/core/WireDatabasePDO.php (872): WireDatabasePDO->pdoWriter() #2 wire/core/WireSaveableItems.php (219): WireDatabasePDO->prepare() #3 wire/core/Wire.php (416): WireSaveableItems->___load() #4 wire/core/WireHooks.php (968): Wire->_callMethod() #5 wire/core/Wire.php (484): WireHooks->runHooks() #6 wire/core/Fields.php (285): Wire->__call() #7 wire/core/Fields.php (172): Fields->getWireArray() #8 wire/core/ProcessWire.php (625): Fields->init() #9 wire/core/ProcessWire.php (578): ProcessWire->initVar() #10 wire/core/ProcessWire.php (315): ProcessWire->load() #11 index.php (52): ProcessWire->__construct() #12 {main} This error message was shown because: site is in debug mode. ($config->debug = true; => site/config.php). Error has been logged. I'm not sure where to go from here! Any advice would be very appreciated. Link to comment Share on other sites More sharing options...
ayz Posted January 18, 2024 Author Share Posted January 18, 2024 Another reason could be that I just changed some passwords for the droplet. How do I update this in the ProcessWire files? Link to comment Share on other sites More sharing options...
ayz Posted January 18, 2024 Author Share Posted January 18, 2024 20 minutes ago, ayz said: Another reason could be that I just changed some passwords for the droplet. How do I update this in the ProcessWire files? I just double checked site/config.php, and changed the password back to match dbPass. Error is still the same! Link to comment Share on other sites More sharing options...
Gideon So Posted January 19, 2024 Share Posted January 19, 2024 Hi @ayz Just login to the Digital Ocean control panel and restart the droplet should fix the error. Gideon Link to comment Share on other sites More sharing options...
ayz Posted January 19, 2024 Author Share Posted January 19, 2024 2 minutes ago, Gideon So said: Hi @ayz Just login to the Digital Ocean control panel and restart the droplet should fix the error. Gideon Thanks for your suggestion. I just restarted the droplet and that didn't solve the issue unfortunately. I just checked the status for MySQL and it says: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Then I tried to reinstall MySQL and it's still showing that it fails to start. Perhaps related? Link to comment Share on other sites More sharing options...
Gideon So Posted January 19, 2024 Share Posted January 19, 2024 Hi @ayz Yes, Seems that the mysql server doesn't start. You need to check the mysqld error log to see if there is a clue for you to solve the problem. Maybe check if mysql has the read/write right to /var/run/mysqld ? Gideon Link to comment Share on other sites More sharing options...
ayz Posted January 19, 2024 Author Share Posted January 19, 2024 Also tried that, and didn't find any possible fixes. Ultimately I started a new droplet from a backup snapshot, and implemented SFTP instead. Remote file editing is working smoothly with this method. Thanks @Gideon So for your suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now