Ярлыки

среда, 18 июля 2012 г.

mysql: add autoincrement column

alter table `new_transport_lines` add column `id` int not null auto_increment KEY FIRST

Could not open a connection to your authentication agent

from here: http://funkaoshi.com/blog/could-not-open-a-connection-to-your-authentication-agent

SSH private-keys are usually stored encrypted on the computers they are stored on. A pass-phrase is used to decrypt them when they are to be used. Since most people use SSH public-private key-pairs to get around typing in passwords all the time, the ssh-agent daemon exists to store decrypted private-keys you plan on using in a given session. The thing most people get tripped up on when using ssh-agent is that what the program outputs, some borne or csh shell commands, needs to be run. It may look like ssh-agent has set some variables for you, but it has in fact done no such thing. If you call ssh-add without processing ssh-agent’s output, it will complain it is unable to open a connection to your authentication agent. The most straightforward way to run ssh-agent on the command line is as follows: eval `ssh-agent`. After doing this, calls to ssh-add should succeed without error.

вторник, 5 июня 2012 г.

mysql: Got a packet bigger than 'max_allowed_packet' bytes


Mysql выдаёт сообщение при попытке залить дамп: "Got a packet bigger than 'max_allowed_packet' bytes"

Открываем mysql ещё в одной консоли, пишем:set max_allowed_packet=100M
Далее повторяем попытку импорта дампа - работает!

Возможно, ещё пригодится параметр: net_buffer_length=1000000

суббота, 19 мая 2012 г.

about time in Python

fabric Remote via SSH

@hosts(EC2_MYSQL_HOST)
def ecMysqlUp():
    env.key_filename = EC2_KEY_FILENAME
    env.user = 'ubuntu'
    print env.host

ssh: too many permissions

слишком много прав тоже плохо, поэтому для ключей ssh пришлось установить chmod 600

Linux console: delete all dir and files by mask

rm -r `find -name 'mymask*' `