Another MySQL Error. ERROR 2006 (HY000) at line []: MySQL server has gone away

When I tried to import fairly large SQL file, I got this error. File was too large to be imported.

This was because ‘max_allowed_packet’ variable had fairly small value. Mine was ‘4194304’ which is 4MB.

I set it to 64 and same import went smoothly.

Let’s look at variables in MySQL: SHOW VARIABLES LIKE ‘max%’. This will bring a large list of variables.

| Variable_name              | Value                |
| max_allowed_packet         | 4194304              |
| max_binlog_cache_size      | 18446744073709547520 |
| max_binlog_size            | 1073741824           |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| max_connect_errors         | 100                  |
| max_connections            | 151                  |
| max_delayed_threads        | 20                   |
| max_digest_length          | 1024                 |
| max_error_count            | 64                   |
| max_execution_time         | 0                    |
| max_heap_table_size        | 16777216             |
| max_insert_delayed_threads | 20                   |
| max_join_size              | 18446744073709551615 |
| max_length_for_sort_data   | 1024                 |
| max_points_in_geometry     | 65536                |
| max_prepared_stmt_count    | 16382                |
| max_relay_log_size         | 0                    |
| max_seeks_for_key          | 18446744073709551615 |
| max_sort_length            | 1024                 |
| max_sp_recursion_depth     | 0                    |
| max_tmp_tables             | 32                   |
| max_user_connections       | 0                    |
| max_write_lock_count       | 18446744073709551615 |
23 rows in set (0,00 sec)

Let’s set ‘max_allowed_packet’ to 64MB (it’s 67108864 bytes): ‘SET GLOBAL max_allowed_packet = 67108864′.

Since we know what we are looking for, let’s query: ‘SHOW VARIABLES LIKE ‘max_allowed_packet’ or ‘SHOW VARIABLES WHERE variable_name = ‘max_allowed_packet”.

SHOW VARIABLES LIKE 'max_allowed_packet';
| Variable_name      | Value    |
| max_allowed_packet | 67108864 |
1 row in set (0,01 sec)

MySQL. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

Since installing fresh MySQL on my MacBook I tried to create a new database user and a new database couple of times. On local I usually use rather weak passwords, but when I was trying to set a weak password, I was getting an error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements.

I googled this error some time ago and somehow I was OK with the results I’ve found:

  • password has to be 8 symbols long,
  • password should have at least one special symbol and one number.

Apparently that happens because of a plugin called validate_password.

You can view validate_password properties: SHOW VARIABLES LIKE ‘validate_password%’.

| Variable_name                        | Value  |
| validate_password_check_user_name    | OFF    |
| validate_password_dictionary_file    |        |
| validate_password_length             | 8      |
| validate_password_mixed_case_count   | 1      |
| validate_password_number_count       | 1      |
| validate_password_policy             | MEDIUM |
| validate_password_special_char_count | 1      |
7 rows in set (0,02 sec)

From the table above we see that ‘validate_password_policy’ is set to ‘MEDIUM’ (1). Other possible values are ‘LOW’ (0) or ‘STRONG’ (2).

We can set it to ‘LOW': SET GLOBAL validate_password_policy = ‘LOW’.

‘validate_password_length’ = 8. This sets password length. It can’t be less than 2 × validate_password_mixed_case_count + validate_password_number_count + validate_password_special_char_count. Let’s leave it 8.

‘validate_password_mixed_case_count’ = 1 means that password should have at least one UPPERCASE and one lowercase letter. This property only works if ‘validate_password_policy’ variable is ‘MEDIUM’ or ‘STRONG’.

‘validate_password_number_count’ = 1. This is the minimum number of numeric (digit) characters. This works if password policy is ‘MEDIUM’ or stronger.

‘validate_password_special_char_count’ = 1. This is minimum number of nonalphanumeric characters. This works if password policy is ‘MEDIUM’ or stronger.

After setting ‘validate_password_policy’ to ‘LOW’ I was able to create weak passwords on my local MySQL.

New Year’s Resolution

OK, it’s almost 2016.

I didn’t ask for any presents, so I probably won’t get anything. But that’s OK. Instead of this, I want to give myself a present — successful and productive 2016.

My New Year’s resolutions will be:

  • Go to the gym once in two days. Even small visits count. A big one for the weekend.
  • Lose 15 kilos.
  • Prepare for 5k in summer.
  • Read a book every 3 weeks.
  • Make work progress every day.
  • Launch a project by end of January.
  • Post a blog every week.

That’s it.


I always like useful online tools that can help me with some simple tasks. I actually have some ideas of such tools myself (but most of them are useless).

One of those tasks I (often) need help with is converting HEX to RGB. I don’t know what for, but I do convert HEXs to RGBs on my old web sites when I make some amends to them.

HEX dot Colorrrs dot com

This website is brilliant. Simple and so elegant.

PS. #CD1414 was my favorite color for a while and still is actually.

PPS. Where is fullscreen mode for Safari in Yosemite?

Apple uses Myriad

It took a while for Apple to replace (not replace, but start using) fonts instead of the graphics on their website. And they chose Myriad Pro by Adobe. This is probably one of the most favourite and used font by designers in any website.

But truth be told this font appears in PSDs and looks very nice. But when the website is converted to HTML and CSS Myriad Pro is usually replaced by… Arial. Clients just don’t want to pay for it.

But typography on Apple website looks stunning. I am about an inch away of buying Myriad Pro to put on this and on other Creogen website.

Keeping your files organized — Muy importante

This post is probably terribly useless, but what it is about is terribly important. I am wondering why I am so lazy to organize (rename, move and delete) files first time I download them?

After moving to my new MacBook I simply can’t find anything. I have about 6 or 7 external hard drives of different capacity. And they all seem to have same files (projects, sites, books) hidden in endless subdirectories.

I recently started to organize my iPhoto library. This is probably the most sensitive information, I believe it is more sensitive and important than some projects, designs and code snippets simply because once lost it can’t be recovered. For the last month or so I’ve been importing same photos (I believe up to 10 copies) from different drives and computers. My iPhoto library is now over 300GB and I simply don’t trust some software to take care of finding and removing duplicates. So I will definitely go through each photo myself and will organize them into events.

But what’s more important, today I promise myself to try and organize everything I am working on, to come up with the structure that will be suitable for all my data and to document what I came up with.


Responsive Design (My First Attempt)

Well, I started to do responsive design. This is not hard at all. Being all mathematical in the past percentages is really easy for me. The thing I don’t understand is people using really shitty values at first.

Why <div class="content"> has to be 31.67777875%? It’s a baseline-ish measure…. Just go for something like 31.25%. This means just couple of pixels difference, but as this is one of the core values your grid will rely on, you don’t need to overcomplicate.

PS. Found this RQRWD site. Very straightforward, beautifully made, but maybe too simple as opposed to Gridset which is overcomplicated for most of the tasks.

Should probably try and make something inbetween.

Blog about anything