The statement '
					pm.map_id, pm.nts_level, pm.nts_block, pm.nts_sheet, pm.nts_map, pm.nts_compass,
					pm.lat_n, pm.lat_s, pm.lon_w, pm.lon_e, pm.map_title,
					r.region_id, r.region_name,
					sc.map_scale_id, sc.map_scale_name,
					COALESCE(xp.avail, 0) AS quantity, xpc.price
			FROM	yb_map_location AS ml
					INNER JOIN yb_map AS m USING (map_id)
					INNER JOIN yb_map AS pm ON m.nts_block = pm.nts_block
					AND		(m.nts_sheet = pm.nts_sheet OR pm.nts_sheet IS NULL)
					AND		(m.nts_map = pm.nts_map OR pm.nts_map IS NULL)
					AND		(m.nts_compass = pm.nts_compass OR pm.nts_compass IS NULL)
					INNER JOIN yb_region AS r ON m.region_id = r.region_id
					LEFT JOIN yb_map_scale AS sc ON pm.map_scale_id = sc.map_scale_id
					LEFT JOIN yb_map_product AS mp ON pm.map_id = mp.map_id
					LEFT JOIN xcart_products AS xp USING (productid)
					LEFT JOIN xcart_pricing AS xpc USING (productid)
					LEFT JOIN yb_product_ref_type AS prt ON mp.product_ref_type_id = prt.product_ref_type_id
			WHERE	ml.location_id = 2959
			AND		(prt.product_ref_type_handle = 'PAPER' OR prt.product_ref_type_handle IS NULL)
			ORDER BY pm.nts_level, pm.map_title;
		' has an error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)