<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-159  評(píng)論-114  文章-7  trackbacks-0

    到底懂不懂系統(tǒng)

    mysql_install_db --defaults-file=/etc/my.cnf --user=mysql

    使用該命令初始化必須保證my.cnf中的目錄創(chuàng)建

    還要配置屬主
    chown -R mysql.mysql /data/mysql

    chown -R mysql.mysql /data/mysql_backup

     

    # The following options will be passed to all MySQL clients
    [client]
    #password       
    = your_password
    port            
    = 3306
    socket          
    = /data/mysql/database/mysql.sock

    # Here follows entries 
    for some specific programs

    # The MySQL server
    [mysqld]
    port            
    = 3306
    socket          
    = /data/mysql/database/mysql.sock
    datadir         
    = /data/mysql/database/
    pid
    -file        = /data/mysql/database/mysql.pid

    skip
    -locking
    key_buffer_size 
    = 2048M
    max_allowed_packet 
    = 2M
    table_open_cache 
    = 512
    sort_buffer_size 
    = 8M
    read_rnd_buffer_size 
    = 4M

    query_cache_size 
    = 1M
    query_cache_type 
    = 1

    # Try number of CPU
    's*2 for thread_concurrency
    thread_concurrency = 16
    thread_cache_size 
    = 8
    innodb_file_per_table

    read_buffer_size 
    = 4M
    myisam_sort_buffer_size 
    = 4M
    myisam_recover
    myisam_repair_threads
    =4

    server
    -id = 1
    log
    -bin=/data/mysql_backup/binlogs/database
    max_binlog_size 
    = 512M
    expire_logs_days 
    = 3
    long_query_time 
    = 2 
    log
    -slow-queries = slow.log 
    log
    -queries-not-using-indexes
    event_scheduler
    =1
    # Uncomment the following 
    if you are using InnoDB tables
    innodb_data_home_dir 
    = /data/mysql/database/
    innodb_data_file_path 
    = ibdata1:20M;ibdata2:10M:autoextend
    #innodb_log_group_home_dir 
    = /var/lib/mysql/
    #innodb_log_arch_dir 
    = /var/lib/mysql/
    # You can set .._buffer_pool_size up to 
    50 - 80 %
    # of RAM but beware of setting memory usage too high
    innodb_buffer_pool_size 
    = 10000M
    innodb_additional_mem_pool_size 
    = 4M
    # Set .._log_file_size to 
    25 % of buffer pool size
    innodb_log_file_size 
    = 8M
    innodb_log_buffer_size 
    = 4M
    #innodb_flush_log_at_trx_commit 
    = 1
    #innodb_lock_wait_timeout 
    = 50

    ##
    #interactive_timeout
    =6048000

    wait_timeout
    =315360000
    interactive_timeout
    =31536000
    connect_timeout
    =60
    max_connect_errors
    =100000000
    max_connections
    =50

    [mysqldump]
    quick
    max_allowed_packet 
    = 16M

    [mysql]
    no
    -auto-rehash
    # Remove the next comment character 
    if you are not familiar with SQL
    #safe
    -updates

    [isamchk]
    key_buffer_size 
    = 256M
    sort_buffer_size 
    = 256M
    read_buffer_size 
    = 128M
    write_buffer_size 
    = 128M

    [myisamchk]
    key_buffer_size 
    = 256M
    sort_buffer_size 
    = 256M
    read_buffer_size 
    = 128M
    write_buffer_size 
    = 128M

    [mysqlhotcopy]
    interactive
    -timeout


    初始化好, mysql -uroot -p   應(yīng)該無需密碼

    然后看>show engines

    mysql> show engines;
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
    | MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
    | BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
    | CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |
    | MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
    | FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
    | ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
    | MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |
    +------------+---------+----------------------------------------------------------------+--------------+------+------------+
    8 rows in set (0.00 sec)



    posted on 2010-04-08 21:59 北國(guó)狼人的BloG 閱讀(8197) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 国产午夜亚洲精品理论片不卡| 亚洲国产精品99久久久久久| 日韩一区二区免费视频| 中文字幕手机在线免费看电影 | 中文字幕视频免费在线观看| 亚洲第一成年网站视频| 久久亚洲AV无码精品色午夜 | 亚洲日本香蕉视频| 亚洲色欲色欲www在线丝| 日本免费福利视频| 中国在线观看免费国语版| 日本免费污片中国特一级| 国产亚洲精品91| 亚洲综合久久精品无码色欲| 久久精品国产亚洲AV高清热| 国产精一品亚洲二区在线播放| 亚洲AⅤ优女AV综合久久久| 日韩毛片无码永久免费看| 丁香花免费完整高清观看| 18禁黄网站禁片免费观看不卡| 成全高清在线观看免费 | 亚洲小说区图片区另类春色| 又大又粗又爽a级毛片免费看| 成人免费在线观看网站| 国产美女在线精品免费观看| 亚洲黄色免费观看| 99久久久国产精品免费牛牛 | 亚洲精品国产字幕久久不卡| 久久久久亚洲AV成人网| 亚洲国产精品不卡毛片a在线| 四虎永久在线精品免费观看地址| 日韩精品免费电影| 午夜a级成人免费毛片| 免费无码一区二区三区蜜桃大| 女人18毛片水最多免费观看| 在线观看免费污视频| 蜜臀91精品国产免费观看| 在线观看国产情趣免费视频 | 免费国产黄网站在线观看动图| 特级一级毛片免费看| kk4kk免费视频毛片|