Friday, September 19, 2014

MyStory - I have bean attending an event

3 month ago, I started to attend an event for designers and engineers.
Actually it was not only them.
Other industry people attended the event.
I didn't know that so many English foreigners live in Tokyo.
It is a small event. It has been happening every month.
But I can see that many English speakers live in Tokyo.

This is a picture of an engineer who was presenting his new Twitter platform.
I could understand about his Twitter platform.
















This picture was taken of break time.
In the small room, It was crowded.
But They look like they are having fun.
















I have been attending the event.
I would like to make a presentation there some day.
So, I have been practicing presentation.
I am thinking what I should choose as a topic.

Mysql - how to alter a column in a table.

@ Add a column into a table in mysql

@ Varchar
ALTER TABLE table_name ADD new_column_name VARCHAR(45) NULL column_name_being;
@ Smallint or int
ALTER TABLE table_name ADD new_column_name SMALLINT UNSIGNED NULL DEFAULT '0' AFTER column_name_being;

Thursday, September 18, 2014

Mysql - How to add user on the mysql

■ Make a db name before the following commands
mysql> GRANT ALL PRIVILEGES ON db_name.* TO user_name@localhost IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON db_name.* TO user_name@'127.0.%' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;

■ Make a new Mysql user
■ The % means the user 'selectUser' connecting from any host.
mysql>CREATE USER 'selectUser'@'%' IDENTIFIED BY 'password';
mysql>GRANT SELECT ON databaseName.* TO 'selectUser'@'%';

■ Make a new Mysql user
mysql>DROP USER 'sample'@'192.168.%';

■ Reference URL
http://www.alphadevx.com/a/388-Adding-a-read-only-MySQL-user