• 17-12-2009, 20:06:53
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Sunucunun mysql i düzenli aralıklar ile yükseliyor. Sunucu özellikleri q9550 8 gb ram. Mysql yaklaşık ram miktarını 7 gb a getirene kadar yükseliyor bu işlem yaklaşık 2 dakika sürüyor. 2 dakika sonunda tekrar düşüşe geçiyor sunucu normal hale geliyor. Tabi bu arada sitelere erişim olmuyor. Bu konuda yardımcı olacak optimizasyon yapabilecek birisini arıyorum.
  • 17-12-2009, 20:18:45
    #2
    my.cnf içinde aşağıdaki değerlerinizi yazarmısınız,

    query_cache_limit =
    query_cache_size =
    query_cache_type =
    tmp_table_size =
    table_cache =

    ayrıca slow queries açıkmı?

    yada daha iyisi my.cnf dosyanızı buraya bi koyun
  • 17-12-2009, 21:17:10
    #3
    [mysqld]
    local-infile=0
    set-variable=max_connections=1500
    set-variable=max_connect_errors=750

    buyur my.cnf slow queries nasıl açılır kapanır bilmem server yönetiminden anlamam doğrusu Sunucu özelliklerini yazmıştım my.cnf buna göre ayarlarmısın lütfen?
  • 17-12-2009, 21:23:51
    #4
    /var/log/mysqld.slow.log dosyasını oluşturduktan sonra, chmod 777 verip aşağıdakileri my.cnf dosyanıza ekleyin, bir 24 saat kadar çalışsın sonra tekrar bakalım.


    Alıntı
    [mysqld]
    max_connections = 1000
    key_buffer = 64M
    myisam_sort_buffer_size = 128M
    join_buffer_size = 8M
    read_buffer_size = 8M
    sort_buffer_size = 12M
    table_cache = 4096
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 400
    connect_timeout = 10
    max_allowed_packet = 64M
    max_connect_errors = 10
    query_cache_limit = 4M
    query_cache_size = 64M
    query_cache_type = 1
    max_heap_table_size = 512M
    tmp_table_size = 512M
    skip-bdb
    local-infile = 0
    log_slow_queries=/var/log/mysqld.slow.log
    long_query_time=5
    open_files_limit=25000
    log_queries_not_using_indexes


    [mysql.server]
    user=mysql

    [mysqld_safe]
    open_files_limit=8192

    [mysqldump]
    quick
    max_allowed_packet=64M

    [myisamchk]
    key_buffer=128M
    sort_buffer=128M
    read_buffer=32M
    write_buffer=32M
  • 17-12-2009, 22:10:47
    #5
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Victories,
    key_buffer, join_buffer_size v.b. tüm my.cnf komutlarının açıklamalarını yapman mümkün mü acaba?
    Benim gibi amator kullanıcılara epey faydası olacaktır. Neyin neye yaradığını planlıyarak sunucumuza göre my.cnf ayarı yapabiliriz sanırım böylece.
  • 17-12-2009, 23:11:08
    #6
    my.cnf verdiğiniz şekilde değiştirdim. Bekleyelim 1-2 gün çalışmasını test edeyim. Tekrar yazarım size değişiklikleri. Teşekkür ederim ilginize.
  • 17-12-2009, 23:18:45
    #7
    RecomeBack adlı üyeden alıntı: mesajı görüntüle
    Victories,
    key_buffer, join_buffer_size v.b. tüm my.cnf komutlarının açıklamalarını yapman mümkün mü acaba?
    Benim gibi amator kullanıcılara epey faydası olacaktır. Neyin neye yaradığını planlıyarak sunucumuza göre my.cnf ayarı yapabiliriz sanırım böylece.
    Bildiğim kadarıyla açıklamaya çalışırım, yalnız yarın burda olmayacağım, 20-25 gündür iyileşmeyen tuhaf bir hastalığım var, doktora gitmem lazım sabah erkenden ankaraya.

    atalay22 adlı üyeden alıntı: mesajı görüntüle
    my.cnf verdiğiniz şekilde değiştirdim. Bekleyelim 1-2 gün çalışmasını test edeyim. Tekrar yazarım size değişiklikleri. Teşekkür ederim ilginize.
    2 gün içinde ara ara özellikle kullanımın yoğun olduğu zamanlarda "mysqladmin -i10 processlist extended-status" komutunun çıktısını alırmısınız, inceleyelim gidişata göre gerekenleri yapalım.
  • 17-12-2009, 23:27:15
    #8
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    o komutu calistirdigimda yukarıdaki hatayı alıyorum.
  • 17-12-2009, 23:31:40
    #9
    servera root olarak bağlı değilmisiniz?

    bağlıysanız mysql root şifresinide server root şifresi ile eşitleyin. size aşağıdaki gibi çıktı vermesi lazım

    Alıntı
    >>>>
    | Key_write_requests | 1329608 |
    | Key_writes | 804229 |
    | Last_query_cost | 0.000000 |
    | Max_used_connections | 388 |
    | Ndb_cluster_node_id | 0 |
    | Ndb_config_from_host | |
    | Ndb_config_from_port | 0 |
    | Ndb_number_of_data_nodes | 0 |
    | Not_flushed_delayed_rows | 0 |
    | Open_files | 1297 |
    | Open_streams | 0 |
    | Open_tables | 776 |
    | Opened_tables | 1022 |
    | Prepared_stmt_count | 0 |
    | Qcache_free_blocks | 4717 |
    | Qcache_free_memory | 31434976 |
    | Qcache_hits | 61849890 |
    | Qcache_inserts | 751599 |
    | Qcache_lowmem_prunes | 11171 |
    | Qcache_not_cached | 601714 |
    | Qcache_queries_in_cache | 10884 |
    | Qcache_total_blocks | 27139 |
    | Queries | 377230178 |
    | Questions | 377230178 |
    | Rpl_status | NULL |
    | Select_full_join | 239 |
    | Select_full_range_join | 10 |
    | Select_range | 5031 |
    | Select_range_check | 5 |
    | Select_scan | 722781 |
    | Slave_open_temp_tables | 0 |
    | Slave_retried_transactions | 0 |
    | Slave_running | OFF |
    | Slow_launch_threads | 0 |
    | Slow_queries | 471921 |
    | Sort_merge_passes | 15 |
    | Sort_range | 36729 |
    | Sort_rows | 4948223 |
    | Sort_scan | 202518 |
    | Table_locks_immediate | 1417366 |
    | Table_locks_waited | 73845 |
    | Tc_log_max_pages_used | 0 |
    | Tc_log_page_size | 0 |
    | Tc_log_page_waits | 0 |
    | Threads_cached | 281 |
    | Threads_connected | 5 |
    | Threads_created | 388 |
    | Threads_running | 3 |
    | Uptime | 71968 |


    aşağıdaki işlemlerle mysql şifrenizi değiştirebilirsiniz. (cpanelde bu seçenek var, cpanel kullanıyorsanız ordan yapın)

    Alıntı
    For Redhat Linux users, use the following instructions as the root user of Redhat Linux machine:

    1. Stop MySQL process by using command:

    # killall mysqld
    2. Start the MySQL server with following options:

    # /usr/libexec/mysqld -Sg –user=root &
    3. Start the MySQL client:

    # mysql

    You should see the following message:

    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 1 to server version: 3.xx.xx

    Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

    mysql>
    4. Use mysql database:

    mysql> USE mysql

    You should see the following message:

    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    5. Then, update the password for the root user with the following command:

    UPDATE user SET password=password(”newpassword”) WHERE user=”root”;

    Replace newpassword with your desired password. You should see the following message:

    Query OK, 2 rows affected (0.03 sec)
    Rows matched: 2 Changed: 2 Warnings: 0

    Rows affected may be different, but the Query OK should be there.
    6. Flush the database privileges to reload it in order to make the changes effective:

    mysql> flush privileges;

    You should get the following result:

    Query OK, 0 rows affected (0.02 sec)
    7. Exit the MySQL client by typing exit.
    8. Kill the MySQL server process by typing killall mysqld.
    9. Then start MySQL again:

    /etc/init.d/mysqld start
    https://www.mydigitallife.info/2006/...root-password/