Top / FAQ



&size(px){Text you want to change};


  • Community : GPL

http://www.gnu.org/home.ja.html








named-pipeBDB
mysqld.exe--
mysqld-max.exe-O
mysqld-debug.exeOO
mysqld-nt.exeO-
mysqld-max-nt.exeOO



http://ftp.iij.ad.jp/pub/db/mysql/Downloads/
http://ftp.lab.kdd.co.jp/database/MySQL/Downloads/
ftp://ftp.u-aizu.ac.jp/ftp/pub/dbms/mysql/mysql.com/Downloads/











  • Linux
  • FreeBSD




CREATE TABLE ..... (.....) TYPE=InnoDB;
ALTER TABLE .... TYPE=MyISAM;
MyISAM
InnoDB
NDB
HEAP(MEMORY)
BDBberkley db
ARCHIVE
CSV
FEDERATED
ISAM




mysqld --default-table-type=innodb
mysqld --default-storage-engine=InnoDB





mysqld --basedir=/usr/local/mysql-4.0.22 --datadir=/usr/local/mysql-4.0.22/data --socket=/tmp/sock4.0.22 --port=4022 &

/usr/local/mysql-4.0.22/my.cnf

[mysqld]
basedir=/usr/local/mysql-4.0.22
datadir=/usr/local/mysql-4.0.22/data
socket=/tmp/sock4.0.22
port=4022
mysqld --defaults-file=/usr/local/mysql-4.0.22/my.cnf &



CREATE TABLE .... (...) DATA DIRECTORY = '/path/to/directory/MYD'  INDEX  DIRECTORY = '/path/to/directory/MYI'
[mysqld]
innodb_data_home_dir =
innodb_data_file_path=/path/to/file1:10M;/path/to/file2:50M
[mysqld]
innodb_file_per_table




mysqlbinlog

  • --start-datetime=
  • --stop-datetime=
  • --start-position=
  • --stop-position=



  • mysqldump
    mysqldump --single-transaction --master-data --skip-opt --create-options --set-charset  --default-character-set=binary
  • InnoDB Hot Backup



  • REPAIR TABLE
    OPTIMIZE TABLE 





case sensitive? case in-sensitive?



init-connect

ex. mysqld --init-connect='SET AUTOCOMMIT=0'



SET AUTOCOMMIT=0;

autocommit mode

SET AUTOCOMMIT=1;



mysqld --max_allowed_packet=



mysqld --max_connections=500


mysqld_safe --open-files-limit=
mysqld --back_log=




    • bdb_cache_size
    • bdb_log_buffer_size
    • innodb_additional_mem_pool_size
    • innodb_buffer_pool_awe_mem_mb
    • innodb_buffer_pool_size
    • innodb_log_buffer_size
    • key_buffer_size
    • query_cache_size
    • join_buffer_size
    • read_buffer_size
    • read_rnd_buffer_size
    • sort_buffer_size



mysqld --log



[mysqld]
default-character-set = ujis


[mysqldump]
default-character-set = ujis

[mysql]
default-character-set = ujis







SHOW VARIABLES LIKE 'char%';



mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | binary                     |
| character_set_connection | binary                     |
| character_set_database   | ujis                       |
| character_set_results    | binary                     |
| character_set_server     | ujis                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
7 rows in set (0.00 sec)



| character_set_client     | ujis                       |
| character_set_connection | ujis                       |
| character_set_database   | ujis                       |
| character_set_results    | ujis                       |
| character_set_server     | ujis                       |



| character_set_client     | binary                     |
| character_set_connection | binary                     |
| character_set_database   | ujis                       |
| character_set_results    | binary                     |
| character_set_server     | ujis                       |



| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | ujis                       |
| character_set_results    | latin1                     |
| character_set_server     | ujis                       |



| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | ujis                       |
| character_set_results    | utf8                       |
| character_set_server     | ujis                       |







[mysqldump]
default-character-set=binary
skip-opt
create-options
set-charset
hex-blob
single-transaction
master-data

http://www.mysql.gr.jp/frame/modules/bwiki/?Contrib



Password
12de31820cbc0fce
4.1*59170D1E4A5E56267B6ED9C51ED62619FB817E6B

[mysqld]
old-passwords







  1. upgrade
    [mysqld]
    default-character-set = ujis
    old-passwords
    
    
    skip-character-set-client-handshake
    
    
    [mysqldump]
    default-character-set = ujis
    skip-opt
    
    [mysql]
    default-character-set = ujis


  2. mysql -f -uroot mysql < mysql_fix_privilege_tables.sql
  3. http://www.mysql.gr.jp/frame/modules/bwiki/?Contrib



[mysqld-4.1]
old-passwords











  1. [mysqld-4.1]
    old-passwords
     
    [mysqld]
    
     
    [mysqldump]
    
    skip-opt
    
    [mysql]
    



  2. mysql -f -uroot mysql < mysql_fix_privilege_tables.sql


  3. http://www.mysql.gr.jp/frame/modules/bwiki/?Contrib







#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
#define MYSQL_DEFAULT_CHARSET_NAME "binary"


#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
#define MYSQL_DEFAULT_COLLATION_NAME "binary"















|                        |
|       connect()        |

+------------------------+

+------- PHP -------------+



| mysql.so (UNIX)         |
| mysql.dll (Windows)     |
+-------------------------+

+----------------------------+

| libmysql.dll (Windows)     |      |                          |







                                    +--------------------------+






4.1(ujis) : +----+-----+-----+
               1     2     3













C

  • mysql_real_escape_string()


ulong STDCALL
mysql_escape_string(char *to,const char *from,ulong length)
{
  return escape_string_for_mysql(default_charset_info, to, from, length);
}
ulong STDCALL
mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length)
{
  return escape_string_for_mysql(mysql->charset, to, from, length);
}

mysql_options(&mysql, MYSQL_READ_DEFAULT_FILE, "/etc/my.cnf");
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "groupname");



PHP

  • mysql_real_escape_string()


http://www.mysql.gr.jp/frame/modules/bwiki/?Contrib

mysqli_options(connection, MYSQLI_READ_DEFAULT_FILE, "/etc/my.cnf");
mysqli_options(connection, MYSQLI_READ_DEFAULT_GROUP, "php");



Ruby

my.options(Mysql::READ_DEFAULT_FILE, "/etc/my.cnf")
my.options(Mysql::READ_DEFAULT_GROUP, "ruby")



Perl

$dsn = "DBI:mysql:test;mysql_read_default_group=perl;mysql_read_default_file=/etc/my.cnf";





InnoDBBDBNDB
READ UNCOMMITTED--
READ COMMITTED
REPEATABLE READ--
SERIALIZABLE--

InnoDB
NDB
BDB
MyISAM







./configure --with-embedded-server



MyISAMInnoDB
1000



SELECT COUNT(*)



InnoDB



auto_increment


ROLLBACK







REPEATABLE READ, SERIALIZABLE




aclocal
autoheader
libtoolize --automake --force
automake
autoconf

cd innobase
aclocal
autoheader
libtoolize --automake --force
automake
autoconf

bk clone bk://mysql.bkbits.net/mysql-5.0 mysql-5.0
bk pull

  • gcc-2.96, egcs-1, gcc-2.8




manual.texi
include.texi
reservedwords.texi
is.texi
internals.texi
manual.cluster.texi

bitkeeper

bk clone bk://mysql.bkbits.net/mysqldoc mysqldoc
bk pull



    • texi2html -Verbose -nomenu manual.texi
      texi2html -nomenu -split=chapter manual.texi


    • texi2dvi manual.texi









MySQL
My
InnoDB
AB
Oy
GmbH

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Counter: 1607, today: 12, yesterday: 0
Last-modified: Mon, 02 Apr 2007 08:25:15 JST (3767d)