#pragma section-numbers off [[TableOfContents]] = 概要 = = 公式サイト = = 関連サイト = * http://www.percona.com/software/ = インストール = [http://dev.mysql.com/downloads/mysql/ MySQL :: Download MySQL Community Server] configure のオプションを確認したい場合は以下を実行。 {{{ strings /usr/bin/mysqlbug | grep configure }}} = 設定 = {{{ sudo cp /usr/local/mysql/support-files/my-medium. cnf /etc/my. cnf }}} {{{ [client] default-character-set=utf8 [mysqld] character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake default-storage-engine=InnoDB }}} = パフォーマンス = * [http://vegan.net/tony/supersmack/ Super Smack] * [http://nippondanji.blogspot.jp/2010/03/innodb-plugin.html 漢(オトコ)のコンピュータ道: InnoDB Pluginことはじめ。快適ストレージエンジン生活はじまる!] * [http://pypi.python.org/pypi/python-handler-socket python-handler-socket 0.2.4 : Python Package Index] * [http://xn--gdk7d.com/?p=744 ドン.com » Blog Archive » HandlerSocket Plugin for MySQLを入れてみた。] * [http://blog.layer8.sh/ja/2011/12/23/mysql%E3%82%92%E9%AB%98%E9%80%9F%E5%8C%96%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E3%81%8D%E3%81%AE%E3%83%81%E3%83%A5%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0/ MySQLを高速化したいときのチューニング方法] * [http://www.mysqlperformanceblog.com/2012/05/16/benchmarking-single-row-insert-performance-on-amazon-ec2/ Benchmarking single-row insert performance on Amazon EC2 - MySQL Performance Blog] = ツール = * [http://www.slideshare.net/marqs/maatkit-4098945 Maatkitの紹介] = GUI クライアント = [http://www.sequelpro.com/ Sequel Pro — MySQL database management app for Mac OS X] [http://www.webyog.com/en/index.php Open Source MySQL GUI Windows Manager Management Client Tool] = 文字コード関係 = {{{ default-character-set=utf8 }}} {{{ show create database mysql; }}} {{{ CREATE DATABASE dbname DEFAULT CHARACTER SET utf8; GRANT ALL ON dbname.* TO username@localhost IDENTIFIED BY "passwd"; }}} [http://www.mysql.gr.jp/mysqlml/mysql/msg/9586 mysql:9586] = パスワード変更等 = [http://hp.vector.co.jp/authors/VA027424/mysql.htm MySQL] {{{ # mysqladmin -u root password new_password # mysqladmin reload }}} {{{--skip-grant-tables}}} [http://dev.mysql.com/doc/refman/4.1/ja/resetting-permissions.html MySQL 4.1 リファレンスマニュアル :: A.4.2 忘れたルートパスワードをリセットする方法] = ユーザ追加 = [http://2php.jp/mysql/adduser.html 2php : MySQLにユーザを追加する] = 利用方法 = {{{ mysql -u [ユーザID] -p [データベース名] -h [ホスト名] }}} [http://allabout.co.jp/internet/database/closeup/CU20030430/ MySQL4 起動の設定~DBの管理 - [データベース]All About] = 既存データのバックアップ = == mysqlhotcopy == 指定された出力先ディレクトリに、データベースのディレクトリをコピーする。 {{{ mysqlhotcopy データベース名 [出力先ディレクトリパス] mysqlhotcopy データベース名1 データベース名2 ... 出力先ディレクトリパス }}} == mysqldump == テーブル定義をCREATE TABLE構文に、データをINSERT INTO構文に変換して出力する。 {{{ mysqldump [OPTIONS] データベース名 [テーブル名] mysqldump [OPTIONS] --databases [OPTIONS] データベース名1 [データベース名2 ...] mysqldump [OPTIONS] --all-databases [OPTIONS] }}} 全データベースをダンプする場合は以下のようになります。 {{{ mysqldump --all-databases > 出力ファイル名 }}} {{{ mysqldump --compatible=mysql40 --default-character-set=utf8 -uユーザ名 DB名 -pパスワード > 出力ファイル名 }}} = 参考サイト = [http://tsuttayo.sytes.net/mysql/ MySQLのページ] [http://www.bitscope.co.jp/tep/MySQL/quickMySQL.html MySQLクイック・リファレンス] [http://homepage1.nifty.com/gak/webdb/mysql.html WindowsでMySQL] [http://www.macfeeling.com/database/index.html Mac OS X + Database] {{{ './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd=shared' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime' '--with-apxs2=/usr/sbin/apxs' }}} ---- CategoryDatabase