Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 2291 to 2300 of 3187 « Previous | Next »
優れたMySQL DBAを見分ける27+3の質問

「優れたPerlプログラマを見分ける27の質問」の日本語訳というエントリが人気だったので、MySQL版をやってみた。題して、「優れたMySQL DBAを見分ける27+3の質問(漢バージョン)」。腕に覚えのある人はぜひ試してみて欲しい。

MySQLのサーバープロセスはいくつある? rootユーザーのパスワードを忘れたときの回復手順 MySQLをオンラインバックアップする方法を3つ。(もっとでも可) InnoDBのデータファイルが作成可能な場所はどこか。 InnoDBのデフォルトの分離レベルは? ネクストキーロックについて説明せよ。 ロールバックセグメントにはどのようなデータが格納されるか? InnoDBでデッドロックが発生したときの挙動、および詳細な状態を確認する方法。 MyISAMがサポートしている特殊なインデックス2つ。 …

[さらに読む]
show tables like 〜の内容でテーブル削除(drop table)

JUGEMテーマ:コンピュータ

このような場合、MySQLのコマンド一発、というわけにはいきませんので、show tablesの出力結果からDDL文を作成します。わかりやすいように三段階で説明します。スクリプト自体は最後のものだけでOKです。

第一段階: テーブルのリストを作成してみる。例えばtで始まるテーブル名は以下のとおり。カラム名や表形式の枠をとりさるために-N -s しているところがミソです。

C:¥Program Files¥MySQL¥MySQL Server 5.5>mysql -uroot -proot -N -s -e "use test;show tables like 't%';"
t10
t100
t101
t2
t3
t4
t5

第二段階: …

[さらに読む]
[event][mysql]OSC2011-東京/春 大盛況無事終了

 オープンソースカンファレンス2011 (OSC2011) 東京/春 に参加してきました。今回も、日本MySQLユーザ会でブースを出しました。  http://www.ospn.jp/osc2011-spring/  福岡から札幌まで、各地のOSCに参加させていただいていて、個人的には東京開催の魅力というのは正直なところ、かなり薄れています。出展者も来場者も多いため、たくさんの話題に触れることができる一方、交流のひとつひとつが非常に希薄になってしまうからです。  それでも、久々の方に会える場として、 ...

How to debug the mysql procedure

When we use the mysql database, we must use some procedure or functions to dispose the data or monitor the database,so we must write the procedures, but if the logic is very complex,we must to debug it, but now mysql can't provide the better tools,so google it and find two tools.
one is dbforge studio for mysql, the professional edition's price less than  $50.
the other is myProcDebugger,you can get the code from link,it's open source tool.

Ibatis SQL Code performance check tool for oracle and mysql

when write the SQL,we want to check the SQL performance,
for example:
1)the SQL can't include select *.
2)the SQL must has certain column.
3)the SQL explain plan must not use full table scan or index scan.

we can define the rule as  following:

<?xml version="1.0" encoding="UTF-8"?> 
<rule-execution-set> 
  <name>daoCheckRules</name> 
  <description>DAO check Rule Execution Set</description> 
  <synonymn name="daoRuleParser" class="com.database.util.daoRuleParser" /> 
 
  <rule name="selectStar" description="Check SQL if has select * " > 
  <if leftTerm="daoRuleParser.getSql"  op="contains" rightTerm="*" /> 
  <then method="daoRuleParser.setCheckSelectStar" arg1="true" /> 
  …

[さらに読む]
MYSQL 5.1.50 and MYSQL5.5.8 Performance Test Report


   



picture(1)





picture(2)



MYSQL5.5 announce the innodb performance improve high, we can get the oracle test report as picture(1). with the excited mood,I test the Mysql5.1.50 buid in/plugin and mysql5.5.8,but the result is discouraging, my test report as picture(2). my server and configure info as following:Cpu/mem:Intel(R) Xeon(R)  E5620 …

[さらに読む]
Oracle10.2.0.4 replicate to mysql5.1

I want to realize the oracle replicate to mysql,oracle as a master DB which provide write and mysql as a slave which provide read,how to realize it?

First, we install the oracle database gateway(11g,DG4ODBC) on oracle DB server,we can download from oracle company and get the install document from oracle metalink;

Second,we install unixodbc and mysqlodbc on the oracle DB server.
Thirdly,we configure the ODBC and DG4ODBC.

thirdly, we create trrigers on all tables and create a table to save the replication data.

the trigger code example as following:

CREATE OR REPLACE TRIGGER tr_repl_test_repl_mysql
   AFTER INSERT OR UPDATE OR DELETE
   ON test_repl_mysql
   FOR EACH ROW
   DECLARE
   v_errm              VARCHAR2 …

[さらに読む]
Performance Test for mysql handlersocket(1)

Get the Handlesocket info by Yoshinori  blog,I test it by perl client and get the expected report.
a)Process=16 and request=1000000*16   

QPS:130429Mysql server Cpu(s): 29.0%us, 20.6%sy 
b)Process=32 and request=1000000*32

QPS:268294Mysql server Cpu(s): 58.1%us, 27.8%sy
c)Process=64 and request=1000000*64

QPS:291960Mysql server Cpu(s): 58.8%us, 28.7%sy

my server configuration as following:
Intel(R) Xeon(R) E5620 X86-64 2.40GHz
2 CPU x 8 Cores/CPU
Linux 2.6.9
32 GB RAM
CentOS release 5.3

How to improve the mysql write performance

when we use the mysql replication, If the sync_binlog
is not set to 1, there is a risk of corruption of the binary log if the
server crashes. But, in many filesystems/OS, sync_binlog=1 is currently way
too slow (sometimes 2-4 times slower than set to 0). we can solve these by following solutions:
1)wait the mysql version upgrade to 5.6,we can get the information from http://forge.mysql.com/worklog/task.php?id=4925

2)change the linux file system to solaris ZFS or use Linux XFS. we can get the information from peter's URL:
http://www.mysqlperformanceblog.com/2009/01/21/beware-ext3-and-sync-binlog-do-not-play-well-together/

3)we want to change the OS or file system,we can …

[さらに読む]
MYSQL master-slave automatic switch mechanism

when when use master1-master2-slave1 structure,if master1 crash, the slave1 can automatic switch to master2,how to do? refer to http://onlamp.com/lpt/a/6549 and I realize it by SQL.you can get the code from:
http://forge.mysql.com/tools/tool.php?id=306