mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.

Published on Author JF8 Comments

This is about resetting the MySQL 5.7 root password in Ubuntu 16.04 LTS You probably tried something like this: sudo service mysql stop mysqld_safe –skip-grant-tables & And then got something like this (stangely, exists is misspelled in the output): [1] 5599 2018-03-02T21:36:41.292413Z mysqld_safe Logging to syslog. 2018-03-02T21:36:41.294798Z mysqld_safe Logging to ‘/var/log/mysql/error.log’. 2018-03-02T21:36:41.296902Z mysqld_safe Directory ‘/var/run/mysqld’… Continue reading mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.

Drupal PDOException: SQLSTATE[HY000] [1045] Access denied for user

Published on Author JFLeave a comment

You might get this error and you’ve lost your mind trying to understand why you updated the password, logged into MySQL successfully from the command line, but still can’t get Drupal to talk to the db? PDOException: SQLSTATE[HY000] [1045] Access denied for user ‘drupal_user’@’127.0.0.1’ (using password: YES) in lock_may_be_available() (line 167 of /var/www/html/website.com/includes/lock.inc). The clue is probably right here beneath your… Continue reading Drupal PDOException: SQLSTATE[HY000] [1045] Access denied for user

Remove all traces of MySQL 5.x on Ubuntu

Published on Author JFLeave a comment

Originally from here, I cleaned it up a bit as an easy reference for me. This works on 14 and 16. sudo service mysql stop #or mysqld sudo apt-get remove –purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean sudo deluser mysql sudo rm -rf /var/lib/mysql sudo apt-get purge mysql-server-core-5.5 (replace with your version… Continue reading Remove all traces of MySQL 5.x on Ubuntu

Accessing MSSQL from Linux using PHP MSSQL_CONNECT

Published on Author JFLeave a comment

MSSQL_CONNECT and MSSQL in PHP on Linux You’ve yum installed php-mssql and you’re still tearing your hair out because you can’t connect to MSSQL from Linux. In this case it’s CentOS 6.7 with PHP 5.6.23 and Apache 2.2.15. You’re using mssql_connect in a basic test script like this one: <?php #################################### # PHP error handling for… Continue reading Accessing MSSQL from Linux using PHP MSSQL_CONNECT

root can’t connect remotely to MySQL 5.5

Published on Author JFLeave a comment

This drove me absolutely nuts. I recently installed CentOS 7 with the typical LAMP configuration. Also, I know. I shouldn’t be using root. I am because it doesn’t matter in this case – it’s not a production machine. I installed MySQL 5.5 and ran the secure installation (mysql_secure_installation). I made sure selinux and firewalld were… Continue reading root can’t connect remotely to MySQL 5.5

Fatal error: Allowed memory size of +Drupal

Published on Author JFLeave a comment

This post is not about adding memory in php.ini or .htaccess or settings.php in Drupal. You might be getting the Fatal Error because of URL redirects causing infinite loops induced by running database update scripts! But, here’s the skinny on adding more memory accessible by Drupal. This will depend on your hosting provider and how much… Continue reading Fatal error: Allowed memory size of +Drupal

MySQL Performance Tuning Scripts

Published on Author JFLeave a comment

A couple handy scripts to help tune MySQL https://answers.launchpad.net/mysql-tuning-primer/+question/166577https://launchpad.net/mysqltuner https://answers.launchpad.net/mysql-tuning-primer/+question/166577 Update: not worth using these as the actually end being self-defeating. They use the very same resources that they suggest modifying and can skew the results. Apparently, tuning your db should be more about configuring your db for your purposes. http://dba.stackexchange.com/questions/45551/how-to-optimize-table-cache