You are here

database

MongoDB on Linux with pecl "configure: error: Cannot find OpenSSL's libraries"

Submitted by Druss on Sun, 2015-12-06 21:29

Edit: Skip this and scroll down for a proper fix!

Just tried installing MongoDB support for PHP on Kubuntu 15.10 via pecl and ran into the following error message which caused the installation to fail:

configure: error: Cannot find OpenSSL's libraries

While this can probably be fixed using some magickery, in my case, I did not want SSL support on a dev server. I just wanted to get the fucker up and running. To this end, I discovered that the issue was that I was using:

MySQL: #1071 - Specified key was too long; max key length is 767 bytes

Submitted by Druss on Fri, 2015-04-03 01:33

Here I was simply creating a MySQL (5.5) table when suddenly up pops the following error:

#1071 - Specified key was too long; max key length is 767 bytes

After a little trial and error, I found that since one of my VARCHAR fields was being used for a UNIQUE index, MySQL was basically telling me that it was using too much space. When I reduced the length of this field from its initial 512 setting to 256 & then 255, it still complained. However, reducing it further to 128 fixed the issue!

PDOException: SQLSTATE[HY000]: General error: 144 Table 'cache_menu' is marked as crashed and last (automatic?) repair failed: DELETE FROM {cache_menu};

Submitted by Druss on Tue, 2013-04-23 10:38

While trying to edit a menu on a Drupal site, I found that none of my changes were being saved. Looking at the logs led me to the following error message:

PDOException: SQLSTATE[HY000]: General error: 144 Table 'cache_menu' is marked as crashed and last (automatic?) repair failed: DELETE FROM {cache_menu};

Simply restarting MySQL did not fix things and it looked like I had to get my hands a li'l dirty.

MySQL's LOAD DATA INFILE leads to an ERROR 29 (HY000) File not found / (Errcode: 13)

Submitted by Druss on Fri, 2011-09-23 01:08

While trying to import a CSV file into MySQL today using the LOAD DATA INFILE command, I ran into the following situation:

mysql> LOAD DATA INFILE 'foo.csv' INTO TABLE bar FIELDS TERMINATED BY ',' ENCLOSED BY '#' LINES TERMINATED BY '\r' (a, b);
ERROR 29 (HY000): File 'foo.csv' not found (Errcode: 13)

The file exists fine and the permissions are also kosher. After much gnashing of teeth and perusing of documentation, I found out that local file sources require the LOCAL keyword:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Submitted by Druss on Fri, 2011-04-22 09:56

I installed MySQL on my local server today and when I went to access it via mysql_secure_installation to set my root password etc., I ran into the following curious error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Subscribe to RSS - database