追è¨ï¼è¨äºã®æä¸ã§5.6ã®sql_modeããã©ã«ãå¤ã«ã¤ãã¦è¥å¹²å®éã®æåã¨ç°ãªã表è¨ããã¦ãã¾ãããrpmã§installããã¨/usr/my.cnfã¨ããã®ãã²ãã£ãããã¦ããã®ä¸ã« [mysqld] sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES ã¨ããè¨è¿°ããããããã/etc/my.cnfã¨åããã¦è¨å®ãã¦ããæ§ã§ããã§ãããã©ã«ãå¤ã«ã¤ãã¦ã¯5.6.6以éã¯ããã©ã«ãå¤ããThe default SQL mode in MySQL 5.6.6 and later is NO_ENGINE_SUBSTITUTION;ãã§ãã以åã®ããã©ã«ãå¤ã¯ãMySQL 5.6.5 and earlier, it was empty (no modes set)ãã¨ãªã£ã¦ããããã§ããã 詳ãã㯠http://yoku0825.blo
ãã¤ã³ã&ã¯ãªãã¯ã ãã§DB ããREST API ãä½æã§ããCData API Server ã§ãMySQL ã®ãã¼ã¿ããREST API ãä½ãã¾ãã ##CData API Server ãã¤ã³ã¹ãã¼ã«## http://www.cdata.com/jp/apiserver/ ä»åã¯ãWindows çã§èª¬æãã¦ãã¾ãã ã¤ã³ã¹ãã¼ã©ã«å¾ã£ã¦ãã¤ã³ã¹ãã¼ã«ãè¡ã£ã¦ãã ããã Windows çãããã¯Java/Linux çãé¸æãã¾ãã ã¤ã³ã¹ãã¼ã«å®äºå¾ã«ãã©ã¦ã¶ã§API Server ã®ç®¡çã³ã³ã½ã¼ã«ç»é¢ãç«ã¡ä¸ããã¾ããã¤ã³ã¹ãã¼ã«æã«è¨å®ããadmin ãã¹ã¯ã¼ããå ¥åãã¦ãã°ã¤ã³ãã¾ãã 管çã³ã³ã½ã¼ã«ã§ãæ å ±ãã¿ããã¯ãªãã¯ããã30æ¥ã®è©ä¾¡çãã¢ã¯ãã£ãã¼ãããããã¯ãªãã¯ãã¾ãã ããã§30æ¥éã®ä½¿ç¨ã©ã¤ã»ã³ã¹ã製åã«è¨å®ããã¾ãã ##MySQL ã¨API Se
MySQL ã¦ã¼ã¶ã®ãã¹ããã¯ã¤ã«ãã«ã¼ãã§æå®ãã¦ãlocalhostã¯å«ã¾ããªã 2012-02-04 MySQLãã¤ã³ã¹ãã¼ã«ããã®ã§ãã¨ããããã¯ã¤ã«ãã«ã¼ãã§ãã¹ãåãæå®ãã¦ãã¹ãç¨ã®ã¦ã¼ã¶ãä½æã mysql> show databases; +-------+ | Database | +-------+ | information_schema | | hoge | | mysql | | performance_schema | | test | +-------+ 5 rows in set (0.00 sec) mysql> grant select on hoge.* to testuser@'%' identified by 'password'; Query OK, 0 rows affected (0.07 sec) mysql> select host,u
ä»æ¥ã¯ä»äºç´ãã ã£ãã®ã§ãä¸å¹´ã®ç· ããããã¨ãã¦MySQLã«ãããã½ã¼ãã®è©±ã§ããããã¨æãã ã¤ã³ããã¯ã¹ãå©ç¨ããªãã¯ã¨ãªã§æãããè¦ããããã®ã®ã²ã¨ã¤ã¯ãORDER BYãç¨ããã½ã¼ãå¦çã ããããããã½ã¼ãå¦çã«ããã¦ã¤ã³ããã¯ã¹ãç¨ãããã¨ãåºæ¥ãã°ãMySQLã¯çµæãæ½åºãã¦ããçµæè¡ãã½ã¼ãããã®ã§ã¯ãªããã¤ã³ããã¯ã¹é ã«è¡ãåãåºãã°è¯ãã®ã§é«éã«ã½ã¼ãå¦çãããã¨ãå¯è½ã«ãªããç¹ã«ãLIMITå¥ãWHEREå¥ãç¨ãã¦è¡ã®çµãè¾¼ã¿ãè¡ãå ´åã¯å¹æã絶大ã§ãããããããã²ã¨ãã³ã¤ã³ããã¯ã¹ãå©ç¨ã§ããªãç¶æ³ã«ç´é¢ããã¨ããã¡ã¾ã¡ãã¼ãã«ã¹ãã£ã³ãçºçãã¦æ§è½ãå£åãã¦ãã¾ãã ä¾ãã°ã100ä¸è¡ã®ã¬ã³ã¼ããæ ¼ç´ããt1ã¨ãããã¼ãã«ãããã¨ããããã®ãã¼ãã«ã«å¯¾ãã¦ä»¥ä¸ã®ãããªã¯ã¨ãªãå®è¡ããå ´åãèãããã mysql> SELECT col1, col2 ... colx
MySQL 5.1ã®mysqldumpslowã使ãã¨ãã¥ã¼ãã³ã°ã楽ã«ãªãï¼ã¨ãã話é¡ã§ãã mysqldumpslowã¯ãã¨ãã¨MySQLã«ä»å±ãã¦ãããã¼ã«ã§ãã¹ãã¼ã¯ã¨ãªãã°ãéè¨ãã¦ããããã®ã§ããããèªä½ã¯MySQL 5.1ã§ç¹ã«å¤ãã£ãã¨ããã¯ããã¾ããããã¹ãã¼ã¯ã¨ãªãã°æ¬ä½ã®æ¹ãæ©è½å¼·åããã¦ãããããçµã¿åãããã¨ãªããªã便å©ã«ãªã£ã¦ãã¾ããMySQL 5.1ã«ãããã¹ãã¼ã¯ã¨ãªãã°ã®ä¸»ãªæ©è½å¼·åã¯ä»¥ä¸ã®ä¸ç¹ã§ãã long_query_timeã«1ç§æªæºã®å¤ãè¨å®ã§ããããã«ãªã£ãã åºåå ãè¨å®ã§ããããã«ãªã£ãã ãããã®è¨å®ããªã³ã©ã¤ã³ã§å¤æ´ã§ããããã«ãªã£ãã ããã§ã©ããªããã¨ããã¨ãMySQLã®æ§è½åæããããã¨æã£ãã¨ãã«ããµã¼ããæ¢ããã«ãã®å ´ã§ mysql> set global slow_query_log = 1; mysql> set glob
MySQL Performance Blogã®ç¿»è¨³ãã¤ã³ã¹ãã¼ã«å¾ã«å¿ ãè¨å®ã確èªããªããã°ãªããªãè¨å®ãã©ã¡ã¼ã¿10ã¤ãæãããã®æå³ã解説ãããMySQLã®è¨å®å¤æ´æã®ãä¸è¬çãªæ³¨æç¹ãåããã¦ã January 28, 2014 By Stephane Combaudon æã ãããã©ã¼ãã³ã¹ç£æ»ã®ä»äºãããæã«ã¯ãMySQLã®è¨å®ã®ã¬ãã¥ã¼ã¨æ¹åææ¡ãæ±ããããã大æµã®å ´åãããããã®ãªãã·ã§ã³ãããä¸ã§ã»ãã®ããã¤ãã®è¨å®ããå¤æ´ããããã«ææ¡ããªããã¨ã«ãå¤ãã®é¡§å®¢ã¯é©ãããã®è¨äºã®ã´ã¼ã«ã¯ããã£ã¨ãéè¦ãªè¨å®ãããã¤ãæãã¦ã¿ããã¨ã«ããã æ¢ã«ãããã£ãææ¡ã¯éå»ã«ããã¦ãããæ°å¹´åã®ãã®ã§ããã以æ¥MySQLã®ä¸çã§ã¯ããããã®å¤åããã£ãã®ã ã 話ã®åã« çç·´ãã人ã§ããé大ãªãã©ãã«ãå¼ãèµ·ãããã¹ããã§ãããã¨ããããå¾ã£ã¦ãããã«æãããã®ãç²ç®çã«é©ç¨ããåã«ã
Dockerã§ãã¼ã¢ã³ãåãããã¨ããã¨initctlããã¾ãåããªãã®ã§ãservice start mysqlã¨ãåºæ¥ãªããã§ããã ããç´æ¥mysqld_safeãèµ·åããã®ã§ãããbaseã¤ã¡ã¼ã¸ããDockerfileã§ã¤ã³ã¹ãã¼ã«ãã¨ãç°¡åã«ã¤ã³ã¹ãã¼ã«ã§ããªããã¨ããã®ããapt-get install mysql-serverããã¨ãã«ãããããªãã·ã§ã³ã対話çã«å ¥åããã¨ããããã®ã§ãDockerfileã§ç´ ç´ã«ã¯åºæ¥ãªããã§ãã ãããã調ã¹ã¦ã¿ãã¨ããããã£ããã©ã¡ã¿ããããããè¨å®ãã¦ã¤ã³ã¹ãã¼ã«ããæ¹æ³ããã£ã¦ãdebconf-set-selectionsã¨ããã³ãã³ããããã«ç¸å½ããã¿ããã§ãããã£ã¨ç°¡åã«ã§ããæ¹æ³ã id:nkwhr ããã«æãã¦ãããã¾ãããDEBIAN_FRONTEND=noninteractiveã¨ç°å¢å¤æ°ã«è¨å®ããã°ããã¿ããã§ããä¸è¨
How do I write a script to install MySQL server on Ubuntu? sudo apt-get install mysql will install, but it will also ask for a password to be entered in the console. How do I do this in a non-interactive way? That is, write a script that can provide the password? #!/bin/bash sudo apt-get install mysql # To install MySQL server # How to write script for assigning password to MySQL root user # End
æ¦è¦MySQLã§æååãæ¤ç´¢å¯¾è±¡ã«ããå ´åãä¸è¬çãªããã©ã«ãè¨å®ã§ã¯å¤§æåã»å°æåãåºå¥ããªãããã®åé¡ã«ãã£ããããã£ã¦ãã¾ã£ãã®ã§ã調æ»ã¨å¯¾çãè¡ã£ãã¡ã¢ãæããã¨ã«ããã åºæ¬çãªãã¨ãããªã®ã«ãã®ãããé·ãã®ã§ããã¤ã¸ã§ã¹ãããèªãã§ããã ããã°ããããOKã«ãã¦ãããæ¤è¨¼éç¨ã«èå³ã®ããæ¹ã¯ãã®ç¶ããã©ããã ãã¤ã¸ã§ã¹ãMySQLã¯ããã©ã«ãã§éç¨ããã¨æååã®æ¯è¼ / 並ã³æ¿ãã§å¤§æå / å°æåãåºå¥ããªãã 大æåå°æåãåºå¥ãã¦æ¤ç´¢ããã«ã¯â¦ ãã¼ãã«åä½ã«ã©ã åä½ã¯ã¨ãªåä½â¦ã§ã®å¯¾å¿ãå¯è½ã ãã¼ã¿å®ç¾©ãã¼ãã«åä½ -- CREATE TABLEæã«ãã¼ãã«ã®ããã©ã«ãæåã³ã¼ãã¨ç §åé åºãæå®ãã CREATE TABLE hoge1 ( id INTEGER PRIMARY KEY AUTO_INCREMENT, str VARCHAR(16) ) ENGINE
ããMySQLã¯ãµãã¯ã¨ãªãå¼±ãã¨è¨ãããããããã¯æ¬å½ã ãããï¼ååã¯æ¬å½ã§ååã¯åã§ãããMySQLã®ãµãã¯ã¨ãªã ã£ã¦ãªãã§ãããã§ãé ãããã§ã¯ãªããè½ã¨ãç©´ããã£ããé¿ãã使ãã©ãããééããªããã°ãµãã¯ã¨ãªãé«éã«å®è¡ã§ããã®ã§ãããä»æ¥ã¯MySQLãã©ããªé¢¨ã«ãµãã¯ã¨ãªãå®è¡ããã©ã®ãããªå ´åã«é ãã®ãã¨ãããã¨ã«ã¤ãã¦èª¬æãããã EXPLAINã§å®è¡è¨ç»ã調ã¹ãéã«ãselect_typeã«ã¯ã¯ã¨ãªã®ç¨®é¡ã表示ãããã®ã ãã代表çãªãµãã¯ã¨ãªã«ã¯æ¬¡ã®3ã¤ã®ãã¿ã¼ã³ãããã SUBQUERY DEPENDENT SUBQUERY DERIVED çµè«ããè¨ãããé ãã®ã¯2çªç®ãDEPENDENT SUBQUERYã§ãããDEPENDENT SUBQUERYã¨ã¯ããããç¸é¢ãµãã¯ã¨ãªã«ç¸å½ãããã®ã§ããµãã¯ã¨ãªã«ããã¦å¤é¨ã¯ã¨ãªã®ã«ã©ã ãåç §ãã¦ãããµãã¯ã¨ãªã®ãã¨ã§ããããã
3. è¬æ¼è ã«ã¤ã㦠⢠å è³ èª äºº (ãã ã¾ãã¨) ⢠@makotokaga ⢠ããªã¼ã©ã³ã¹Webã¨ã³ã¸ã㢠⢠æ¥æ¬PostgreSQLã¦ã¼ã¶ä¼çäº â¢ æ¬æ¥ã®åºèª¿è¬æ¼ã®Ustreamæ å½ â¢ ç©æ¬²ç³»Blogãæ¸ãã¦ãã¾ã ⢠http://blog.project92.com 4. ã´ã¼ã« ⢠MySQL+PHPã§ç¨¼åãã¦ããã¨ãã Webã¢ããªã±ã¼ã·ã§ã³ããPostgreSQL +PHPã«ç§»è¡ãã â¢ã¿ã¼ã²ããã¨ãªã£ãæ§ã·ã¹ãã ⢠MySQL 5.0.x (InnoDB) ⢠PHP 5.1.x â¢æ°ã·ã¹ãã ⢠PostgreSQL 9.0.x ⢠PHP 5.3.x 5. ã©ãããæãã¤ãããï¼ â¢ ã¾ãã¯ãæ å ±åé ⢠Converting from other Databases to PostgreSQL â¢http://wiki.postgresql.org/w
(2014.12.3追è¨ï¼ãã®blogã®å 容ã¯ã以ä¸ã®æ¸ç±ã«ãåæ ãããã) SQLã¬ãã«ã®å·®ç° MariaDB5.5ã¨MySQL5.5ã§ã¯SQLã¬ãã«ã§ã®éãã¯ã»ã¨ãã©ãªãã£ããautoincrementã®æ大å¤ã®æ±ããããã ãã ããMariaDB10.0ã§REGEXPããã«ããã¤ã対å¿ã«ãªã£ãã®ã§ãã¢ããªå´ã¯æ³¨æã é ç® MySQL MariaDB Autoincrement æ大å¤ã«éããã¨ã以éã¯æ大å¤ãç¹°ãè¿ããWarningã®ã¿ãã¨ã©ã¼ã«ãªããªããtinyintãªãâ¦,125,126,127,127,127⦠æ大å¤-1ã¾ã§ã以éã¯ã¨ã©ã¼ãè¿ããtinyintãªãâ¦,125,126,ERROR,ERROR,⦠EXPLAINæ JSONå½¢å¼ ãã¼ã¸ã§ã³5.6ãã æªå¯¾å¿ Optimizer Trace ãã¼ã¸ã§ã³5.6ãã æªå¯¾å¿ï¼ãã ããMariaDBã®ã»ãããªããã£ãã¤ã¶
1. MySQL Admin ãè¦ã Devs ã®å¸¸èã DBA ã¯é常è 2013/09/14 yoku0825@MyNA PHP Conference 2013 2. ï¼¼ããã«ã¡ã¯ï¼ï¼ â yoku0825 â ã¨ããä¼æ¥ã® DBA â MySQL æ´ 5 å¹´ããã â ãªã©ã¯ããªã â ãã¹ã°ããªã â å«ã®å¤« â ãããã®ç¶ â æ¥æ¬ MySQL ã¦ã¼ã¶ä¼ (MyNA) ã®ã¹ããæ å½ 3. ï¼¼ããã¹ããã¨ï¼ï¼ â æ¥å¸¸çã« MySQL ã®ã½ã¼ã¹ã³ã¼ãã«è§¦ããå¤æ DBA ãããã¼ã® Devs ã«æããæã®ããµã«ãªé ( ã®ã¤ãã ) â ã¦ãã®éçºè¨èªã¯ PHP > Java >> Ruby ãããã§ã â ã¦ãã§ã¯ DBA ããµã¼ãã¼ã®æ§ç¯ã Devs ãè¨è¨ã» ãã¼ãã«æ§ç¯ã»éå¶ã DBA ã¯ãã©ãã«ã·ã¥ã¼ããæ¹ åææ¡ ( éç¨ ) ãã¨ãããµã¤ã¯ã«ã§åãã¦ãã¾ãã
SAVEPOINTãROLLBACK TO SAVEPOINT ããã³ RELEASE SAVEPOINT ã¹ãã¼ãã¡ã³ã
opscodeã®ãªãã¸ããªã«ããMySQLã®cookbookã§ã¯ãrootã¦ã¼ã¶ãã¬ããªã±ã¼ã·ã§ã³ç¨ã®ã¦ã¼ã¶ã®ãã¹ã¯ã¼ããã©ã³ãã ã«çæãã¦è¨å®ãã¦ããã opscode ã® recipe ã®ç¹å¾´ ãã®ã©ã³ãã ã¨ããç¹ãã«ãã¼ããã¹ãããã¾ãä»çµã¿ãçµã¿è¾¼ã¾ãã¦ããã ãã¹ã¯ã¼ããè¨å®ããã¨ãã㯠node.set_unless['mysql']['server_root_password'] = secure_password ã¨ãã£ãå½¢ã§ãattributeã«è¨å®ããã¦ããªãå ´åã¯ã©ã³ãã ã«çæããã¨ããäºããã¦ã2度ç®ä»¥éãåããã¹ã¯ã¼ãã¨ãªãããã«ãªã£ã¦ããã 2åç®ä»¥éãåããã¹ã¯ã¼ããä¿è¨¼ããããã«ãããã²ã¨ã¤ã®æã unless Chef::Config[:solo] ruby_block "save node data" do block do node.save end
ã¯ããã« Djangoã使ã£ãã¢ããªã±ã¼ã·ã§ã³ã§ã2ã¤ã®ãããå¦çç¨ããã»ã¹AãBãåæã«ç«ã¡ä¸ããã¨ãã«ãAã®ãã©ã³ã¶ã¯ã·ã§ã³ã§save & commitããå¤ãBã§ã¯èªã¿åããªãã¨ããåé¡ã«ç´é¢ãã¾ããã åé¡ã®ç®æã®ã½ã¼ã¹ã³ã¼ãã¯ãã®ãããªæãã§ãã å®è¡é ããã»ã¹A ããã»ã¹B 1 with commit_on_success(): p = Post(id=1) p.save() 2 # saveãããã¼ã¿ãè¦ãã Post.objects.get(id=1) 3 with commit_on_success(): p = Post(id=2) p.save() 4 # saveãããã¼ã¿ãè¦ããä¾å¤çºç Post.objects.get(id=2) Djangoã§ã¯ããã©ã«ãã§èªåã³ããããæå¹ãªã®ã§ãAã§ã³ãããããå¤ãBã§èªã¿åããã¯ãã¨æã£ã¦ããã®ã§ãããããã¯ééãã§ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}