Mysql: errno: 24 – Too many open files) (1018)

При создании бекапа выскочина ошибка

mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'logs'': Can't read dir of './mydatabase/' (errno: 24 - Too many open files) (1018)

Хотя в limits.conf указано значение 30000 и в my.cnf

open-files-limit = 20000

И процесс запущен с правильными параметрами

/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/error.log --open-files-limit=20000 --pid-file=/var/run/mysql.run  --port=3306

Читати далі

Telegram Bot on ruby

apt-get install ruby gem ruby-dev make gem install telegram-bot-ruby Теперь необходимо получить токен для бота. Заходим в Telegram, добавляем бота @BotFather, и создаем бота: So, let’s write to out bot and get updates curl -s -X POST https://api.telegram.org/botNNNNN:NZNZNNZNZNZNNZNZ/getUpdates And we have: {“ok”:true,”result”:[{“update_id”:923096141, “message”:{“message_id”:2130,”from”:{“id”:,”first_name”:””,”username”:””},”chat”:{“id”:,”first_name”:””,”username”:””,”type”:”private”},”date”:1447842513,”text”:”test”}}]} # encoding: utf-8 # require ‘telegram/bot’ #require_relative ‘getimg’ token = ‘NNNNNN:XNXNXNXNXNXNXNXNX’ #inputMess … Читати далі

ESP8266 first launch in Linux Mint

esp8266-01 pin
esp8266-01 pin

For flashing firmware you need connect GPIO0 to GND and CH_PD to VCC
I have this TTL converter

Bus 003 Device 026: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

But they have 5v output, so i used 5v to 3.3v converter

5v-to-3.3v
5v-to-3.3v

Prepare notebook for flashing
Go to https://github.com/themadinventor/esptool
and download esptool

wget https://github.com/themadinventor/esptool/archive/master.zip

install Python pip

apt-get -y install python-pip

Inzip our master.zip

unzip esptool-master.zip

Run installing dependency

python setup.py install

Читати далі

Добавить существующий Git репозиторий в Bitbucket

git clone –mirror https://bitbucket.org/exampleuser/repository-to-mirror.git # Make a bare mirrored clone of the repository cd repository-to-mirror.git git remote set-url –push origin https://github.com/exampleuser/mirrored # Set the push location to your mirror git push –mirror

Vagrant: libvirt library not found in default locations (RuntimeError)

vagrant plugin install vagrant-libvirt Installing the ‘vagrant-libvirt’ plugin. This can take a few minutes… Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: An error occurred while installing ruby-libvirt … Читати далі

Mysql 5.7: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

В версии mysql 5.7 теперь нужно обязательно указывать время жизни пароля для root пользователя.
Это может застать в расплох в самый неподходящий момент, особенно во время рестарта приложения.
Чтобы этого избежать рекомендуэтся задать время его жизни такими способами.
Установиль дефолтное значение через конфиг:

Задаем 180дней

    [mysqld]
    default_password_lifetime=180

Безлимитные пароли:

    [mysqld]
    default_password_lifetime=0

Читати далі