grant select, insert, execute on dev to ‘hoge@%’ indeintified by ‘password’

grant select, insert, update on ${table_name}.* to user@’%’ identified by ‘password’

mysql> create database dev;
Query OK, 1 row affected (0.14 sec)

mysql> use dev;
Database changed
mysql> grant select, insert, update, delete execute on dev.* to 'user'@'%' identified by 'password';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'execute on dev.* to 'user'@'%' identified by 'password'' at line 1
mysql> grant select, insert, update, delete, execute on dev.* to 'user'@'%' identified by 'password';
Query OK, 0 rows affected (0.19 sec)

ほーーーーーー

lower_case_table_names

MySQL has a variable named lower_case_table_names, which is a parameter that sets whether to distinguish case of table names.

0
Store database names and table names in uppercase and lowercase letters. The comparison of these names is also case sensitive. If the file system of the OS on which the MySQL server runs is case insensitive(eg OS X or windows), it should not be set to this value. If you set this value to 0 on such a file system and access the MyISAM table name by mixing case, sometimes the index may be destroyed.

1
Everything is rounded to lowercase when storing table names and database names. The comparison of names is case insensitive.

2
When storing the table name and database name, store it as it is (that is, store it-while preserving upper case letters and lower case letters). When looking up, these names are converted to lowercase letters, and comparison of names is done without distinguishing uppercase and lowercase letters. Note that this function work only on file systems that do not distinguish between uppercase and lowercase letters. The table name of InnoDB is stored in all lowercase letters as when setting lower_case_table_names = 1.

[vagrant@localhost ~]$ cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

character_set_server=utf8
default-storage-engine=InnoDB
innodb_file_per_table

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql

# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1

# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema

[mysql]
default-character-set=utf8

ないですね、ということはmy.cnfに追加できるってことかな。。

character_set_server

character_set_client: The sql statement issued on the client side becomes this character code
character_set_connection: converts characters received from the client into this character code
character_set_database: character code of the DB currently being referenced
character_set_results: The search result sent to the client is this character code
character_set_server: Default character code when creating DB
character_set_system: utf8 is always used in the character set used by the system

character-set-filesystem: file system character code

mod_perl, mod_ssl, mod_wsgi

mod_perlは、Perl言語で記述されたプログラムを高速に実行できる機能を持った、apacheのモジュール。このモジュールを組み込むと、perlでapache APIを利用することができるようになる。

ApacheをSSL対応するためには、mod_sslとOpenSSLが必要。ApacheでSSL/TLSを利用するためのモジュールとしてmod_sslが利用されている。

mod_wsgiは、WSGI(Web Server Gateway Interface)インターフェイスに準拠したPythonのプログラムをApache HTTP Serverで動作させるためのモジュール。

sudo perl -MCPAN -e shell

http://www.cpan.org/SITES.html

setting url to get

Japan
ftp://ftp.nara.wide.ad.jp/pub/CPAN/
http://ftp.nara.wide.ad.jp/pub/CPAN/
rsync://ftp.nara.wide.ad.jp/cpan/

install Test::Pod
-> PODの書式に誤りがないかを確認する

install YAML
-> YAML形式のファイルを読み込む

install CGI
-> サーバ上で動作

install CGI::Session
-> CGIアプリケーションにおける持続的なデータのセッション

install Pod::Escapes
-> This module provides things that are useful in decoding Pod E<..> sequences. Presumably, it should be used only by Pod parsers and/or formatters.

install Pod::Simple
-> Pod::Simple is a Perl library for parsing text in the Pod (“plain old documentation”) markup language that is typically used for writing documentation for Perl and for Perl modules. The Pod format is explained in perlpod; the most common formatter is called perldoc.

install Jcode
-> 日本語文字集合ハンドラ。Jcode.pmはオブジェクト的なアプローチと従来のアプローチの両方をサポート。オブジェクト的なアプローチでは、 $iso_2022_jp = Jcode->new($str)->h2z->jis とすることもできる。

install Mail::Sendmail
-> Simple platform independent e-mail from your perl script. Only requires Perl 5 and a network connection. After struggling for some time with various command-line mailing programs which never what i wanted, i put together this perl only solution.

use Mail::Sendmail;
%mail = ( To => 'hoge@gmail.com',
          From => 'me@here.com',
          Message => 'This is very short message');
sendmail(%mail) or die %Mail::Sendmail::error;

print "OK, Log says:\n", $Mail::Sendmail::log;

install OLE::Storage_Lite
-> Simple Class for OLE document interface. allow you to read and write an OLE structured file. class representing PPS.

install Spreadsheet::ParseExcel
-> read information from an Excel file.

install Net::OpenSSH
-> OpenSSH is a secure shell client package implemented on top of OpenSSH binary client. This package is implemented around the multiplexing feature found in later version of OpenSSH.

install Capture::Tiny
-> Capture::Tiny provides a simple, portable way to capture almost anything sent to STDOUT or STDERR, regardless of whether it comes from Perl, from XS code or from an external program. Optionally, output can be teed so that it is captured whilebeig passed through to the original filehandles.

install Date::Calc
-> グレゴリオ暦に基づいた日付計算

install FCGI
-> CGI.pmによって作成されるCGIオブジェクトのサブクラス。 Open Market FastCGI標準でうまく機能するように特殊化されている。

install Time::HiRes
-> 高精度のalarm, sleep, gettimeofday, インターバル・タイマー。

install DBI
-> Database independent interface for Perl

install Text::CSV_XS
-> CSV形式の操作ルーチン。コンマ区切り文字列CSVを組み立てたり切り分けたりするのに便利な機能を提供する。フィールド群を連結してCSV文字列にしたり、パースしてフィールド群にすることができる。

install ExtUtils::MakeMaker
-> モジュール用Makefileの生成。Makefile.PLにおいて拡張モジュールのためのMakefileを書くために設計されている。

install DBD::mysql
-> MysqlのためのPerl DBIドライバ。

install IO::Stringy
-> I/O on in-core objects like strings and arrays. This toolkit primarily provides modules for performing both traditional and object oriented i/o on things.

xlib, libX11, libXext, libXi, libXrender, libXtst

Xlib is a library for clients of X window system, written in C language. Includes subroutines that interact with the X server. By using these subroutines, it is possible to write programs without knowing the details of the X protocol.

[vagrant@localhost ~]$ yum list installed | grep xlib
[vagrant@localhost ~]$

[vagrant@localhost ~]$ yum list installed | grep libX11
libX11.x86_64 1.6.4-3.el6 @base
libX11-common.noarch 1.6.4-3.el6 @base

[vagrant@localhost ~]$ yum list installed | grep libXext
libXext.x86_64 1.3.3-1.el6 @base

[vagrant@localhost ~]$ yum list installed | grep libXi
libXi.x86_64 1.7.8-1.el6 @base

[vagrant@localhost ~]$ yum list installed | grep libXrender
libXrender.x86_64 0.9.10-1.el6 @base

[vagrant@localhost ~]$ yum list installed | grep libXtst
libXtst.x86_64 1.2.3-1.el6 @base

[vagrant@localhost ~]$ yum list installed | grep libjpeg-turbo
libjpeg-turbo.x86_64 1.2.1-3.el6_5 @base
[vagrant@localhost ~]$ yum list installed | grep libpng
libpng.x86_64 2:1.2.49-2.el6_7 @base
[vagrant@localhost ~]$ yum list installed | grep tzdata-java
tzdata-java.noarch 2018f-1.el6 @updates

default-character-set

[vagrant@localhost ~]$ cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

character_set_server=utf8
default-storage-engine=InnoDB
innodb_file_per_table

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql

# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1

# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema

[mysql]
default-character-set=utf8

[mysqldump]
default-character-set=utf8

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

ふむふむ、ありました。なるほどー
[mysql]
default-character-set=utf8

[mysqldump]
default-character-set=utf8

mysqlbinlog

mysqlbinlog is “information recorded in a form that can trace the operation history when changing the contents of the database, such as CREATE TABLE statement or INSERT statement”.

[vagrant@localhost ~]$ mysqlbinlog
mysqlbinlog Ver 3.4 for Linux at x86_64
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Dumps a MySQL binary log in a format usable for viewing or for piping to
the mysql command line client.

Usage: mysqlbinlog [options] log-files
  -?, --help          Display this help and exit.
  --base64-output=name
                      Determine when the output statements should be
                      base64-encoded BINLOG statements: 'never' disables it and
                      works only for binlogs without row-based events;
                      'decode-rows' decodes row events into commented
                      pseudo-SQL statements if the --verbose option is also
                      given; 'auto' prints base64 only when necessary (i.e.,
                      for row-based events and format description events).  If
                      no --base64-output[=name] option is given at all, the
                      default is 'auto'.
  --bind-address=name IP address to bind to.
  --character-sets-dir=name
                      Directory for character set files.
  -d, --database=name List entries for just this database (local log only).
  --debug-check       Check memory and open file usage at exit .
  --debug-info        Print some debug info at exit.
  --default-auth=name Default authentication client-side plugin to use.
  -D, --disable-log-bin
                      Disable binary log. This is useful, if you enabled
                      --to-last-log and are sending the output to the same
                      MySQL server. This way you could avoid an endless loop.
                      You would also like to use it when restoring after a
                      crash to avoid duplication of the statements you already
                      have. NOTE: you will need a SUPER privilege to use this
                      option.
  -F, --force-if-open Force if binlog was not closed properly.
                      (Defaults to on; use --skip-force-if-open to disable.)
  -f, --force-read    Force reading unknown binlog events.
  -H, --hexdump       Augment output with hexadecimal and ASCII event dump.
  -h, --host=name     Get the binlog from server.
  -l, --local-load=name
                      Prepare local temporary files for LOAD DATA INFILE in the
                      specified directory.
  -o, --offset=#      Skip the first N entries.
  -p, --password[=name]
                      Password to connect to remote server.
  --plugin-dir=name   Directory for client-side plugins.
  -P, --port=#        Port number to use for connection or 0 for default to, in
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
                      /etc/services, built-in default (3306).
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -R, --read-from-remote-server
                      Read binary logs from a MySQL server. This is an alias
                      for read-from-remote-master=BINLOG-DUMP-NON-GTIDS.
  --read-from-remote-master=name
                      Read binary logs from a MySQL server through the
                      COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID commands by
                      setting the option to either BINLOG-DUMP-NON-GTIDS or
                      BINLOG-DUMP-GTIDS, respectively. If
                      --read-from-remote-master=BINLOG-DUMP-GTIDS is combined
                      with --exclude-gtids, transactions can be filtered out on
                      the master avoiding unnecessary network traffic.
  --raw               Requires -R. Output raw binlog data instead of SQL
                      statements, output is to log files.
  -r, --result-file=name
                      Direct output to a given file. With --raw this is a
                      prefix for the file names.
  --secure-auth       Refuse client connecting to server if it uses old
                      (pre-4.1.1) protocol.
                      (Defaults to on; use --skip-secure-auth to disable.)
  --server-id=#       Extract only binlog entries created by the server having
                      the given id.
  --server-id-bits=#  Set number of significant bits in server-id
  --set-charset=name  Add 'SET NAMES character_set' to the output.
  -s, --short-form    Just show regular queries: no extra info and no row-based
                      events. This is for testing only, and should not be used
                      in production systems. If you want to suppress
                      base64-output, consider using --base64-output=never
                      instead.
  -S, --socket=name   The socket file to use for connection.
  --start-datetime=name
                      Start reading the binlog at first event having a datetime
                      equal or posterior to the argument; the argument must be
                      a date and time in the local time zone, in any format
                      accepted by the MySQL server for DATETIME and TIMESTAMP
                      types, for example: 2004-12-25 11:25:56 (you should
                      probably use quotes for your shell to set it properly).
  -j, --start-position=#
                      Start reading the binlog at position N. Applies to the
                      first binlog passed on the command line.
  --stop-datetime=name
                      Stop reading the binlog at first event having a datetime
                      equal or posterior to the argument; the argument must be
                      a date and time in the local time zone, in any format
                      accepted by the MySQL server for DATETIME and TIMESTAMP
                      types, for example: 2004-12-25 11:25:56 (you should
                      probably use quotes for your shell to set it properly).
  --stop-never        Wait for more data from the server instead of stopping at
                      the end of the last log. Implicitly sets --to-last-log
                      but instead of stopping at the end of the last log it
                      continues to wait till the server disconnects.
  --stop-never-slave-server-id=#
                      The slave server_id used for --read-from-remote-server
                      --stop-never.
  --stop-position=#   Stop reading the binlog at position N. Applies to the
                      last binlog passed on the command line.
  -t, --to-last-log   Requires -R. Will not stop at the end of the requested
                      binlog but rather continue printing until the end of the
                      last binlog of the MySQL server. If you send the output
                      to the same MySQL server, that may lead to an endless
                      loop.
  -u, --user=name     Connect to the remote server as username.
  -v, --verbose       Reconstruct pseudo-SQL statements out of row events. -v
                      -v adds comments on column data types.
  -V, --version       Print version and exit.
  --open-files-limit=#
                      Used to reserve file descriptors for use by this program.
  -c, --verify-binlog-checksum
                      Verify checksum binlog events.
  --binlog-row-event-max-size=#
                      The maximum size of a row-based binary log event in
                      bytes. Rows will be grouped into events smaller than this
                      size if possible. This value must be a multiple of 256.
  --skip-gtids        Do not print Global Transaction Identifier information
                      (SET GTID_NEXT=... etc).
  --include-gtids=name
                      Print events whose Global Transaction Identifiers were
                      provided.
  --exclude-gtids=name
                      Print all events but those whose Global Transaction
                      Identifiers were provided.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
base64-output                     (No default value)
bind-address                      (No default value)
character-sets-dir                (No default value)
database                          (No default value)
debug-check                       FALSE
debug-info                        FALSE
default-auth                      (No default value)
disable-log-bin                   FALSE
force-if-open                     TRUE
force-read                        FALSE
hexdump                           FALSE
host                              (No default value)
local-load                        (No default value)
offset                            0
plugin-dir                        (No default value)
port                              0
read-from-remote-server           FALSE
read-from-remote-master           (No default value)
raw                               FALSE
result-file                       (No default value)
secure-auth                       TRUE
server-id                         0
server-id-bits                    32
set-charset                       (No default value)
short-form                        FALSE
socket                            (No default value)
start-datetime                    (No default value)
start-position                    4
stop-datetime                     (No default value)
stop-never                        FALSE
stop-never-slave-server-id        -1
stop-position                     18446744073709551615
to-last-log                       FALSE
user                              (No default value)
open-files-limit                  64
verify-binlog-checksum            FALSE
binlog-row-event-max-size         4294967040
skip-gtids                        FALSE
include-gtids                     (No default value)
exclude-gtids                     (No default value)

あれ? default-character-setがない!?

show slave status\G;

show slave status\G;
-> confirmation of operation of MySQL replication

mysql> show slave status\G;
Empty set (0.06 sec)

ERROR:
No query specified

rtc_cmos: probe of rtc_cmos failed with error -16

rtc_cmos: probe of rtc_cmos failed with error -16

Error related to time synchronization at OS startup

https://forums.aws.amazon.com/thread.jspa?threadID=87634

Re: Linux EC2 instance unresponsive! crashed?
Posted by: msloc016
Posted on: Feb 23, 2012 2:15 PM
in response to: msloc016 in response to: msloc016
 	Click to reply to this thread	Reply
I did just see that logwatch gave me this:

WARNING: Kernel Errors Present
http://2230098.568434 rtc_cmos: probe of rtc_cmos failed with error -16 ...: 1 Time(s)
http://8424538.017762 rtc_cmos: probe of rtc_cmos failed with error -16 ...: 1 Time(s)
Don't know if that means anything to anyone.

なるほどな、コミュニティのスレッドで調べるのか、勉強になります。