MySQL初始化以及客户端工具的使用
MySQL初始化以及客户端工具的使用
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
mysql> select user,host,password from user;
+-------------+-------------+-------------------------------------------+
| user | host | password |
+-------------+-------------+-------------------------------------------+
| root | localhost | |
| root | yinzhengjie | |
| root | 127.0.0.1 | |
| | localhost | |
| | yinzhengjie | |
| yinzhengjie | .%.%.% | *C260A4F79FA905AF65142FFE0B9A14FE0E1519CC |
+-------------+-------------+-------------------------------------------+
rows in set (0.00 sec) mysql>
mysql>
mysql>
mysql>
mysql> drop user ""@localhost;
Query OK, rows affected (0.01 sec) mysql> drop user ""@yinzhengjie;
Query OK, rows affected (0.00 sec) mysql> select user,host,password from user;
+-------------+-------------+-------------------------------------------+
| user | host | password |
+-------------+-------------+-------------------------------------------+
| root | localhost | |
| root | yinzhengjie | |
| root | 127.0.0.1 | |
| yinzhengjie | .%.%.% | *C260A4F79FA905AF65142FFE0B9A14FE0E1519CC |
+-------------+-------------+-------------------------------------------+
rows in set (0.00 sec) mysql>
第一种方式:
mysql > set password for username@host = password( 'your_password');
第二种方法
mysql > update user set password = password('your_password') where user = 'root';
mysql > flush peivileges;
第三种方式:
[root@yinzhengjie ~]#mysqladmin -u UserName -h Host password 'new_password' -p
[root@yinzhengjie ~]#mysqladmin -u UserName -h Host -p flush-privileges
[root@yinzhengjie ~]# mysqladmin create yinzhengjiedb #创建一个叫yinzhengjiedb的数据库。
[root@yinzhengjie ~]# mysql -e 'show databases;' #我们可以用mysql的-e选项来进行验证是否创建成功、
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
| yinzhengjiedb |
+--------------------+
[root@yinzhengjie ~]#
2.删除数据库
[root@yinzhengjie ~]# mysql -e 'show databases;'
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
| yinzhengjiedb |
+--------------------+
[root@yinzhengjie ~]# mysqladmin drop yinzhengjiedb
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed. Do you really want to drop the 'yinzhengjiedb' database [y/N] y #此处我们需要交互式输入一个y。
Database "yinzhengjiedb" dropped
[root@yinzhengjie ~]# mysql -e 'show databases;'
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| yinzhengjie |
+--------------------+
[root@yinzhengjie ~]#
3.输出MySQL简要状态信息
[root@yinzhengjie ~]# mysqladmin status #输出简要状态信息
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin status --sleep --count 5 #表示每个1秒刷新一次,总共打印5次
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
[root@yinzhengjie ~]#
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin status --sleep #表示每秒刷新一次,可以安装Ctrl+C 结束
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
Uptime: Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.0
^C[root@yinzhengjie ~]#
4.debug 调试信息用法展示
[root@yinzhengjie ~]# more /var/log/mysqld.log
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin debug
[root@yinzhengjie ~]# more /var/log/mysqld.log Memory status:
Non-mmapped space allocated from system:
Number of free chunks:
Number of fastbin blocks:
Number of mmapped regions:
Space in mmapped regions:
Maximum total allocated space:
Space available in freed fastbin blocks:
Total allocated space:
Total free space:
Top-most, releasable space:
Estimated memory (with thread stack): Events status:
LLA = Last Locked At LUA = Last Unlocked At
WOC = Waiting On Condition DL = Data Locked Event scheduler status:
State : INITIALIZED
Thread id :
LLA : n/a:
LUA : n/a:
WOC : NO
Workers :
Executed :
Data locked: NO Event queue status:
Element count :
Data locked : NO
Attempting lock : NO
LLA : drop_schema_events:
LUA : drop_schema_events:
WOC : NO
Next activation : never Status information: Current dir: /var/lib/mysql/
Running threads: Stack size:
Current locks:
lock: 0x7f7740089338: lock: 0x7f7740086ee8: lock: 0x7f77400847b8: lock: 0x7f77400823f8: lock: 0x7f7740080488: lock: 0x7f774007f398: lock: 0x7f7740072028: lock: 0x7f774006ba58: lock: 0x7f7740069368: lock: 0x7f7740065678: lock: 0x7f7740061a98: lock: 0x7f774005ede8: lock: 0x7f774005b838: lock: 0x7f77400595c8: lock: 0x7f774004ed08: lock: 0x7f774004a758: lock: 0x7f7740044c38: lock: 0x7f77400400b8: lock: 0x7f77400377c8: lock: 0x7f7740031ed8: lock: 0x7f7740029c08: lock: 0x7f7740027cf8: lock: 0x7f7740024308: lock: 0x7f774001e728: lock: 0x7f77400158e8: lock: 0x7f774000ceb8: lock: 0x291f5f8: lock: 0x29148c8: lock: 0x2909d28: lock: 0x2900de8: lock: 0x28f65f8: lock: 0x28e6f58: lock: 0x28e1098: lock: 0x28d93f8: Key caches:
default
Buffer_size:
Block_size:
Division_limit:
Age_limit:
blocks used:
not flushed:
w_requests:
writes:
r_requests:
reads: handler status:
read_key:
read_next:
read_rnd
read_first:
write:
delete
update: Table status:
Opened tables:
Open tables:
Open files:
Open streams: Alarm status:
Active alarms:
Max used alarms:
Next alarm time: Begin safemalloc memory dump: End safemalloc memory dump.
[root@yinzhengjie ~]#
debug 打开调试日志并记录与error log中
5.extended-status用法展示
[root@yinzhengjie ~]# mysqladmin extended-status
+-----------------------------------+----------+
| Variable_name | Value |
+-----------------------------------+----------+
| Aborted_clients | |
| Aborted_connects | |
| Binlog_cache_disk_use | |
| Binlog_cache_use | |
| Bytes_received | |
| Bytes_sent | |
| Com_admin_commands | |
| Com_assign_to_keycache | |
| Com_alter_db | |
| Com_alter_db_upgrade | |
| Com_alter_event | |
| Com_alter_function | |
| Com_alter_procedure | |
| Com_alter_server | |
| Com_alter_table | |
| Com_alter_tablespace | |
| Com_analyze | |
| Com_backup_table | |
| Com_begin | |
| Com_binlog | |
| Com_call_procedure | |
| Com_change_db | |
| Com_change_master | |
| Com_check | |
| Com_checksum | |
| Com_commit | |
| Com_create_db | |
| Com_create_event | |
| Com_create_function | |
| Com_create_index | |
| Com_create_procedure | |
| Com_create_server | |
| Com_create_table | |
| Com_create_trigger | |
| Com_create_udf | |
| Com_create_user | |
| Com_create_view | |
| Com_dealloc_sql | |
| Com_delete | |
| Com_delete_multi | |
| Com_do | |
| Com_drop_db | |
| Com_drop_event | |
| Com_drop_function | |
| Com_drop_index | |
| Com_drop_procedure | |
| Com_drop_server | |
| Com_drop_table | |
| Com_drop_trigger | |
| Com_drop_user | |
| Com_drop_view | |
| Com_empty_query | |
| Com_execute_sql | |
| Com_flush | |
| Com_grant | |
| Com_ha_close | |
| Com_ha_open | |
| Com_ha_read | |
| Com_help | |
| Com_insert | |
| Com_insert_select | |
| Com_install_plugin | |
| Com_kill | |
| Com_load | |
| Com_load_master_data | |
| Com_load_master_table | |
| Com_lock_tables | |
| Com_optimize | |
| Com_preload_keys | |
| Com_prepare_sql | |
| Com_purge | |
| Com_purge_before_date | |
| Com_release_savepoint | |
| Com_rename_table | |
| Com_rename_user | |
| Com_repair | |
| Com_replace | |
| Com_replace_select | |
| Com_reset | |
| Com_restore_table | |
| Com_revoke | |
| Com_revoke_all | |
| Com_rollback | |
| Com_rollback_to_savepoint | |
| Com_savepoint | |
| Com_select | |
| Com_set_option | |
| Com_show_authors | |
| Com_show_binlog_events | |
| Com_show_binlogs | |
| Com_show_charsets | |
| Com_show_collations | |
| Com_show_column_types | |
| Com_show_contributors | |
| Com_show_create_db | |
| Com_show_create_event | |
| Com_show_create_func | |
| Com_show_create_proc | |
| Com_show_create_table | |
| Com_show_create_trigger | |
| Com_show_databases | |
| Com_show_engine_logs | |
| Com_show_engine_mutex | |
| Com_show_engine_status | |
| Com_show_events | |
| Com_show_errors | |
| Com_show_fields | |
| Com_show_function_status | |
| Com_show_grants | |
| Com_show_keys | |
| Com_show_master_status | |
| Com_show_new_master | |
| Com_show_open_tables | |
| Com_show_plugins | |
| Com_show_privileges | |
| Com_show_procedure_status | |
| Com_show_processlist | |
| Com_show_profile | |
| Com_show_profiles | |
| Com_show_slave_hosts | |
| Com_show_slave_status | |
| Com_show_status | |
| Com_show_storage_engines | |
| Com_show_table_status | |
| Com_show_tables | |
| Com_show_triggers | |
| Com_show_variables | |
| Com_show_warnings | |
| Com_slave_start | |
| Com_slave_stop | |
| Com_stmt_close | |
| Com_stmt_execute | |
| Com_stmt_fetch | |
| Com_stmt_prepare | |
| Com_stmt_reprepare | |
| Com_stmt_reset | |
| Com_stmt_send_long_data | |
| Com_truncate | |
| Com_uninstall_plugin | |
| Com_unlock_tables | |
| Com_update | |
| Com_update_multi | |
| Com_xa_commit | |
| Com_xa_end | |
| Com_xa_prepare | |
| Com_xa_recover | |
| Com_xa_rollback | |
| Com_xa_start | |
| Compression | OFF |
| Connections | |
| Created_tmp_disk_tables | |
| Created_tmp_files | |
| Created_tmp_tables | |
| Delayed_errors | |
| Delayed_insert_threads | |
| Delayed_writes | |
| Flush_commands | |
| Handler_commit | |
| Handler_delete | |
| Handler_discover | |
| Handler_prepare | |
| Handler_read_first | |
| Handler_read_key | |
| Handler_read_next | |
| Handler_read_prev | |
| Handler_read_rnd | |
| Handler_read_rnd_next | |
| Handler_rollback | |
| Handler_savepoint | |
| Handler_savepoint_rollback | |
| Handler_update | |
| Handler_write | |
| Innodb_buffer_pool_pages_data | |
| Innodb_buffer_pool_pages_dirty | |
| Innodb_buffer_pool_pages_flushed | |
| Innodb_buffer_pool_pages_free | |
| Innodb_buffer_pool_pages_misc | |
| Innodb_buffer_pool_pages_total | |
| Innodb_buffer_pool_read_ahead_rnd | |
| Innodb_buffer_pool_read_ahead_seq | |
| Innodb_buffer_pool_read_requests | |
| Innodb_buffer_pool_reads | |
| Innodb_buffer_pool_wait_free | |
| Innodb_buffer_pool_write_requests | |
| Innodb_data_fsyncs | |
| Innodb_data_pending_fsyncs | |
| Innodb_data_pending_reads | |
| Innodb_data_pending_writes | |
| Innodb_data_read | |
| Innodb_data_reads | |
| Innodb_data_writes | |
| Innodb_data_written | |
| Innodb_dblwr_pages_written | |
| Innodb_dblwr_writes | |
| Innodb_log_waits | |
| Innodb_log_write_requests | |
| Innodb_log_writes | |
| Innodb_os_log_fsyncs | |
| Innodb_os_log_pending_fsyncs | |
| Innodb_os_log_pending_writes | |
| Innodb_os_log_written | |
| Innodb_page_size | |
| Innodb_pages_created | |
| Innodb_pages_read | |
| Innodb_pages_written | |
| Innodb_row_lock_current_waits | |
| Innodb_row_lock_time | |
| Innodb_row_lock_time_avg | |
| Innodb_row_lock_time_max | |
| Innodb_row_lock_waits | |
| Innodb_rows_deleted | |
| Innodb_rows_inserted | |
| Innodb_rows_read | |
| Innodb_rows_updated | |
| Key_blocks_not_flushed | |
| Key_blocks_unused | |
| Key_blocks_used | |
| Key_read_requests | |
| Key_reads | |
| Key_write_requests | |
| Key_writes | |
| Last_query_cost | 0.000000 |
| Max_used_connections | |
| Not_flushed_delayed_rows | |
| Open_files | |
| Open_streams | |
| Open_table_definitions | |
| Open_tables | |
| Opened_files | |
| Opened_table_definitions | |
| Opened_tables | |
| Prepared_stmt_count | |
| Qcache_free_blocks | |
| Qcache_free_memory | |
| Qcache_hits | |
| Qcache_inserts | |
| Qcache_lowmem_prunes | |
| Qcache_not_cached | |
| Qcache_queries_in_cache | |
| Qcache_total_blocks | |
| Queries | |
| Questions | |
| Rpl_status | NULL |
| Select_full_join | |
| Select_full_range_join | |
| Select_range | |
| Select_range_check | |
| Select_scan | |
| Slave_open_temp_tables | |
| Slave_retried_transactions | |
| Slave_running | OFF |
| Slow_launch_threads | |
| Slow_queries | |
| Sort_merge_passes | |
| Sort_range | |
| Sort_rows | |
| Sort_scan | |
| Ssl_accept_renegotiates | |
| Ssl_accepts | |
| Ssl_callback_cache_hits | |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | |
| Ssl_connect_renegotiates | |
| Ssl_ctx_verify_depth | |
| Ssl_ctx_verify_mode | |
| Ssl_default_timeout | |
| Ssl_finished_accepts | |
| Ssl_finished_connects | |
| Ssl_session_cache_hits | |
| Ssl_session_cache_misses | |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | |
| Ssl_session_cache_size | |
| Ssl_session_cache_timeouts | |
| Ssl_sessions_reused | |
| Ssl_used_session_cache_entries | |
| Ssl_verify_depth | |
| Ssl_verify_mode | |
| Ssl_version | |
| Table_locks_immediate | |
| Table_locks_waited | |
| Tc_log_max_pages_used | |
| Tc_log_page_size | |
| Tc_log_page_waits | |
| Threads_cached | |
| Threads_connected | |
| Threads_created | |
| Threads_running | |
| Uptime | |
| Uptime_since_flush_status | |
+-----------------------------------+----------+
[root@yinzhengjie ~]#
输出mysq的各状态变量及数值,相当于执行“mysql> show global status”
6.flush-hosts
[root@yinzhengjie ~]# mysqladmin flush-hosts #清空主机相关的缓存:DNS解析缓存,此前因为连接错误次数过多而被拒绝访问mysqld的主机列表
[root@yinzhengjie ~]#
7. flush-logs
[root@yinzhengjie ~]# mysqladmin flush-logs #日志滚动,主要是二进制日志和中继日志
[root@yinzhengjie ~]#
8.refresh
[root@yinzhengjie ~]# mysqladmin refresh #相当于同时使用flush-logs和flush-hosts
[root@yinzhengjie ~]#
9.flush-privileges
[root@yinzhengjie ~]# mysqladmin flush-privileges #通知服务器重读授权表
[root@yinzhengjie ~]#
10.reload
[root@yinzhengjie ~]# mysqladmin reload #重载授权表,相当于flush-privileges
[root@yinzhengjie ~]#
11.flush-status
[root@yinzhengjie ~]# mysqladmin flush-status #重置状态变量的值
[root@yinzhengjie ~]#
12.flush-tables
[root@yinzhengjie ~]# mysqladmin flush-tables #关闭当前打开的表文件句柄
[root@yinzhengjie ~]#
13.flush-threads
[root@yinzhengjie ~]# mysqladmin flush-threads #清空线程缓存
[root@yinzhengjie ~]#
14.kill
[root@yinzhengjie ~]# mysqladmin kill #需要输入线程ID哟
mysqladmin: Too few arguments to 'kill'
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin processlist #线程列表
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| | root | localhost | | Query | | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
[root@yinzhengjie ~]#
16.password
[root@yinzhengjie ~]# mysqladmin -u root -h localhost password 'yinzhengjie' -p
Enter password: -------->注意,由于我的数据库一开始是没有设置密码的,因此我这里是第一次给我的数据库设置密码,这里要求我们输入以前的密码我们直接回车即可。
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin -u root -h localhost -pyinzhengjie flush-privileges #需要刷新一下授权。
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysql -pyinzhengjie #验证是否可用正常登陆。
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.1. Source distribution Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
17.ping
[root@yinzhengjie ~]# mysqladmin -pyinzhengjie ping #判断MySQL是否在线。
mysqld is alive
[root@yinzhengjie ~]#
18.shutdown
[root@yinzhengjie ~]# mysqladmin -pyinzhengjie shutdown #关闭mysqld进程
[root@yinzhengjie ~]# lsof -i:
[root@yinzhengjie ~]#
19.start-slave
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin -pyinzhengjie start-slave #启动从服务器进程
20.stop-slave
[root@yinzhengjie ~]#
[root@yinzhengjie ~]# mysqladmin -pyinzhengjie stop-slave #关闭从服务器进程
21.variables
[root@yinzhengjie ~]# mysqladmin -pyinzhengjie variables
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| Variable_name | Value |
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| auto_increment_increment | |
| auto_increment_offset | |
| autocommit | ON |
| automatic_sp_privileges | ON |
| back_log | |
| basedir | /usr/ |
| big_tables | OFF |
| binlog_cache_size | |
| binlog_direct_non_transactional_updates | OFF |
| binlog_format | STATEMENT |
| bulk_insert_buffer_size | |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
| completion_type | |
| concurrent_insert | |
| connect_timeout | |
| datadir | /var/lib/mysql/ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | |
| delay_key_write | ON |
| delayed_insert_limit | |
| delayed_insert_timeout | |
| delayed_queue_size | |
| div_precision_increment | |
| engine_condition_pushdown | ON |
| error_count | |
| event_scheduler | OFF |
| expire_logs_days | |
| flush | OFF |
| flush_time | |
| foreign_key_checks | ON |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | |
| ft_min_word_len | |
| ft_query_expansion_limit | |
| ft_stopword_file | (built-in) |
| general_log | OFF |
| general_log_file | /var/run/mysqld/mysqld.log |
| group_concat_max_len | |
| have_community_features | YES |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_dynamic_loading | YES |
| have_geometry | YES |
| have_innodb | YES |
| have_ndbcluster | NO |
| have_openssl | DISABLED |
| have_partitioning | YES |
| have_query_cache | YES |
| have_rtree_keys | YES |
| have_ssl | DISABLED |
| have_symlink | DISABLED |
| hostname | yinzhengjie |
| identity | |
| ignore_builtin_innodb | OFF |
| init_connect | |
| init_file | |
| init_slave | |
| innodb_adaptive_hash_index | ON |
| innodb_additional_mem_pool_size | |
| innodb_autoextend_increment | |
| innodb_autoinc_lock_mode | |
| innodb_buffer_pool_size | |
| innodb_checksums | ON |
| innodb_commit_concurrency | |
| innodb_concurrency_tickets | |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | |
| innodb_file_io_threads | |
| innodb_file_per_table | OFF |
| innodb_flush_log_at_trx_commit | |
| innodb_flush_method | |
| innodb_force_recovery | |
| innodb_lock_wait_timeout | |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_buffer_size | |
| innodb_log_file_size | |
| innodb_log_files_in_group | |
| innodb_log_group_home_dir | ./ |
| innodb_max_dirty_pages_pct | |
| innodb_max_purge_lag | |
| innodb_mirrored_log_groups | |
| innodb_open_files | |
| innodb_rollback_on_timeout | OFF |
| innodb_stats_method | nulls_equal |
| innodb_stats_on_metadata | ON |
| innodb_support_xa | ON |
| innodb_sync_spin_loops | |
| innodb_table_locks | ON |
| innodb_thread_concurrency | |
| innodb_thread_sleep_delay | |
| innodb_use_legacy_cardinality_algorithm | ON |
| insert_id | |
| interactive_timeout | |
| join_buffer_size | |
| keep_files_on_create | OFF |
| key_buffer_size | |
| key_cache_age_threshold | |
| key_cache_block_size | |
| key_cache_division_limit | |
| language | /usr/share/mysql/english/ |
| large_files_support | ON |
| large_page_size | |
| large_pages | OFF |
| last_insert_id | |
| lc_time_names | en_US |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_bin_trust_routine_creators | OFF |
| log_error | /var/log/mysqld.log |
| log_output | FILE |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | |
| long_query_time | 10.000000 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | |
| max_allowed_packet | |
| max_binlog_cache_size | |
| max_binlog_size | |
| max_connect_errors | |
| max_connections | |
| max_delayed_threads | |
| max_error_count | |
| max_heap_table_size | |
| max_insert_delayed_threads | |
| max_join_size | |
| max_length_for_sort_data | |
| max_long_data_size | |
| max_prepared_stmt_count | |
| max_relay_log_size | |
| max_seeks_for_key | |
| max_sort_length | |
| max_sp_recursion_depth | |
| max_tmp_tables | |
| max_user_connections | |
| max_write_lock_count | |
| min_examined_row_limit | |
| multi_range_count | |
| myisam_data_pointer_size | |
| myisam_max_sort_file_size | |
| myisam_mmap_size | |
| myisam_recover_options | OFF |
| myisam_repair_threads | |
| myisam_sort_buffer_size | |
| myisam_stats_method | nulls_unequal |
| myisam_use_mmap | OFF |
| net_buffer_length | |
| net_read_timeout | |
| net_retry_count | |
| net_write_timeout | |
| new | OFF |
| old | OFF |
| old_alter_table | OFF |
| old_passwords | OFF |
| open_files_limit | |
| optimizer_prune_level | |
| optimizer_search_depth | |
| optimizer_switch | index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on |
| pid_file | /var/run/mysqld/mysqld.pid |
| plugin_dir | /usr/lib64/mysql/plugin |
| port | |
| preload_buffer_size | |
| profiling | OFF |
| profiling_history_size | |
| protocol_version | |
| pseudo_thread_id | |
| query_alloc_block_size | |
| query_cache_limit | |
| query_cache_min_res_unit | |
| query_cache_size | |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | |
| rand_seed1 | |
| rand_seed2 | |
| range_alloc_block_size | |
| read_buffer_size | |
| read_only | OFF |
| read_rnd_buffer_size | |
| relay_log | |
| relay_log_index | |
| relay_log_info_file | relay-log.info |
| relay_log_purge | ON |
| relay_log_space_limit | |
| report_host | |
| report_password | |
| report_port | |
| report_user | |
| rpl_recovery_rank | |
| secure_auth | OFF |
| secure_file_priv | |
| server_id | |
| skip_external_locking | ON |
| skip_name_resolve | OFF |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_compressed_protocol | OFF |
| slave_exec_mode | STRICT |
| slave_load_tmpdir | /tmp |
| slave_max_allowed_packet | |
| slave_net_timeout | |
| slave_skip_errors | OFF |
| slave_transaction_retries | |
| slow_launch_time | |
| slow_query_log | OFF |
| slow_query_log_file | /var/run/mysqld/mysqld-slow.log |
| socket | /var/lib/mysql/mysql.sock |
| sort_buffer_size | |
| sql_auto_is_null | ON |
| sql_big_selects | ON |
| sql_big_tables | OFF |
| sql_buffer_result | OFF |
| sql_log_bin | ON |
| sql_log_off | OFF |
| sql_log_update | ON |
| sql_low_priority_updates | OFF |
| sql_max_join_size | |
| sql_mode | |
| sql_notes | ON |
| sql_quote_show_create | ON |
| sql_safe_updates | OFF |
| sql_select_limit | |
| sql_slave_skip_counter | |
| sql_warnings | OFF |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| sync_binlog | |
| sync_frm | ON |
| system_time_zone | PST |
| table_definition_cache | |
| table_lock_wait_timeout | |
| table_open_cache | |
| table_type | MyISAM |
| thread_cache_size | |
| thread_handling | one-thread-per-connection |
| thread_stack | |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| timed_mutexes | OFF |
| timestamp | |
| tmp_table_size | |
| tmpdir | /tmp |
| transaction_alloc_block_size | |
| transaction_prealloc_size | |
| tx_isolation | REPEATABLE-READ |
| unique_checks | ON |
| updatable_views_with_limit | YES |
| version | 5.1. |
| version_comment | Source distribution |
| version_compile_machine | x86_64 |
| version_compile_os | redhat-linux-gnu |
| wait_timeout | |
| warning_count | |
+-----------------------------------------+-------------------------------------------------------------------------------------------+
[root@yinzhengjie ~]#
variables:显示mysql的各服务器进程
六.GUI客户端工具
1>.Navicat for mysql
2>.SQLyog
3>.MySQL Front
4>.phpMyAdmin
5>.MySQL Query Browser
6>.MySQL Administrator
7>.MySQL Workbench
MySQL初始化以及客户端工具的使用的更多相关文章
- JDBC 查询mysql数据库比客户端工具慢的解决办法
在URL链接参数中配置rewriteBatchedStatements.useServerPrepStmts为true url="jdbc:mysql://****/dbName?useSS ...
- mysql在windows(含客户端工具)及linux(yum)环境下安装
下载 地址:https://dev.mysql.com/downloads/ windows安装包下载 linux安装包下载 https://dev.mysql.com/downloads/mysql ...
- mysql基础-数据库初始化操作必要步骤和客户端工具使用-记录(二)
0x01 mysql启动时,读取配置文件的顺序 Default options are read from the following files in the given order:/etc/my ...
- MySQL客户端工具的使用与MySQL SQL语句
MySQL客户端工具的使用 1.MySQL程序的组成 客户端 mysql:CLI交互式客户端程序 mycli:CLI交互式客户端程序;使用sql语句时会有提示信息 mysql_secure_insta ...
- 4个mysql客户端工具的比较
mysql是我以前学习和练习所使用的数据,现在在工作中也在使用,之前公司里用oracle,我在做自己的东西的时候觉得用oracle太不方便,于是就找了mysql(当时也考虑过sqlserver,觉得还 ...
- 个人推荐,比较好的MySQL客户端工具
关于啊,MySQL客户端,实在是太多了.本人也是正在摸索中. MySQL Workbench phpMyAdmin SQLyog Navicat for MySQL MySQL Server MySQ ...
- MySQL Server类型之MySQL客户端工具的下载、安装和使用
本博文的主要内容有 .MySQL Server 5.5系列的下载 .MySQL Server 5.5系列的安装 .MySQL Server 5.5系列的使用 .MySQL Server 5.5系列的卸 ...
- MySQL Workbench类型之MySQL客户端工具的下载、安装和使用
本博文的主要内容有 .MySQL Workbench的下载 .MySQL Workbench的安装 .MySQL Workbench的使用 个人推荐,比较好的MySQL客户端工具 注意啊! 对于noi ...
- mysql客户端工具
MySQL 数据库不仅提供了数据库的服务器端应用程序,同时还提供了大量的客户端工具程序,如 mysql,mysqladmin,mysqldump 等等,都是大家所熟悉的.虽然有些人对这些工具的功能都已 ...
随机推荐
- 【第九课】MriaDB密码重置和慢查询日志
目录 1.如何进行修改MariaDB的密码 2.Mariadb的慢查询日志 1.如何进行修改MariaDB的密码 记得root密码的修改方式: [root@localhost ~]# mysqladm ...
- C#Unit单元测试之读取Web.config文件
长期一来,我们所完成的项目都没有写单元测试,今天我一时兴起,决定给自己写的代码写单元测试,简单的测试代码分分钟完成了,一运行测试,就懵逼了.没能达到我的预期效果,而是出现图1所示错误. 图1:单元测试 ...
- idea 开启 tomcat 访问日志记录
all 为 设置为 查看所有类型的请求 (包括ajax)
- PowerBI开发 第十三篇:增量刷新
PowerBI 将要解锁增量刷新(Incremental refresh)功能,这是一个令人期待的更新,使得PowerBI可以加载大数据集,并能减少数据的刷新时间和资源消耗,该功能目前处于预览状态,只 ...
- FastDFS教程Ⅰ-文件服务器安装与Nginx配置
1.简介 FastDFS是一个开源的轻量级分布式文件系统,它对文件进行管理,功能包括:文件存储.文件同步.文件访问(文件上传.文件下载)等,解决了大容量存储和负载均衡的问题.特别适合以文件为载 ...
- nginx反向代理设置自定义错误页面
为nginx反向代理设置自定义错误页面 转:https://blog.csdn.net/u014433030/article/details/77507839 如果我们的nginx配置了反向代理,如下 ...
- BugkuCTF web2
前言 写了这么久的web题,算是把它基础部分都刷完了一遍,以下的几天将持续更新BugkuCTF WEB部分的题解,为了不影响阅读,所以每道题的题解都以单独一篇文章的形式发表,感谢大家一直以来的支持和理 ...
- 萌新程序媛的首个作品,基于NoSQL的内容管理及低码开发平台
尽管入行有一段时间了,但之前还从来没想过要开发一款完整的软件产品.这个我跟朋友开发的第一款软件,希望大家帮我们多宣传推广.首个版本肯定有很多的不足,大家也给我们多提意见,还有很多规划中的功能要在之后的 ...
- openstack删除僵尸卷
问题描述: 最近在清理openstack环境,在删除cinder云硬盘时,一直发现有两个卷在删除中. 解决方法如下: 首先我们去cinder的数据库中找到这个卷,命令为: MariaDB [(none ...
- Backbone实践案例
By:软件11 王思伦 2013-10-4 Backbone简述: Backbone基于MVC架构,用于开发重量级Javascript应用的框架. 如上文所述,Backbone包含多种类,但主要包含了 ...