• mysql的auto-rehash简介


    今天在看mysql的配置文件的时候,发现有"auto-rehash"不明白什么意思,在此记录一下,auto-rehash是自动补全的意思,就像我们在linux命令行里输入命令的时候,使用tab键的功能是一样的,例如
    mysql> use mysql
    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
    mysql> select host
    host.Alter_priv host.Alter_routine_priv host.Create_priv host.Create_routine_priv 
    host.Create_tmp_table_priv host.Create_view_priv host.Db host.Delete_priv 
    host.Drop_priv host.Execute_priv host.Grant_priv host.Host 
    host.Index_priv host.Insert_priv host.Lock_tables_priv host.References_priv 
    host.Select_priv host.Show_view_priv host.Trigger_priv host.Update_priv 
    host 
    mysql> select host

    默认是不使用自动补全功能的,这个参数在配置文件中的[mysql]下面。如:

    my.cnf示例片段:

    [mysql]
    prompt=[h][u]@d
    :m:s>
    no-auto-rehash
    
    [client]
    port=3306
    socket=/data/mysql/mysql.sock
    
    [mysqld]
    user=mysql
    port=3306
    slow_query_log_file=mysql.slow
    log-bin=mysql-bin
    binlog-format=STATEMENT
    skip-name-resolve
    log-error=mysql.err
    default-storage-engine=INNODB
    character-set-server=utf8
    long_query_time=1
    slow_query_log=1
    innodb_data_file_path=ibdata1:100M:autoextend
    innodb_log_file_size=1G
    innodb_file_per_table=1
    datadir=/data/mysql/
    innodb_data_home_dir=/data/mysql/
    innodb_log_group_home_dir=/data/mysql/
    pid-file=/data/mysql/mysql.pid
    socket=/data/mysql/mysql.sock
    innodb_buffer_pool_size=512M


  • 相关阅读:
    Maven 在pom.xml的build中配置resources,来防止我们资源导出失败的问题
    JavaWeb
    MySQL
    JavaScript
    Caused by: org.apache.ibatis.exceptions.PersistenceExceptiong 更新IDEA后报错
    Loading class `com.mysql.jdbc.Driver‘. This is deprecated.警告处理,jdbc更新处
    mybatis+oracle添加数据时如果数据存在就更新,如果不存在就插入
    条件查询器Wrapper
    查询和删除
    时间和悲观锁
  • 原文地址:https://www.cnblogs.com/huangmr0811/p/5570996.html
Copyright © 2020-2023  润新知