show database 没有mysql数据库 解决办法

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_31648761/article/details/80759180

某天突然发现数据库只有一个自建的库和information_schema这两个库,找到一个解决办法

mysqld_safe --skip-grant-tables

去到mysql的安装目录下的bin目录,运行上面的命令启动即可

展开阅读全文

mysql数据库SHOW processlist锁表的问题

08-08

数据库的运行速度很慢。rn用SHOW processlist来看了下它的连接情况,发现就算语句是select、insert这样的,struts仍然显示locked。rn第一次用mysql,照理说这样应该是不锁表的啊,为什么会显示locked?rn还有,这个locked,是行级锁还是表级锁啊?rnrn谢谢诸位大拿。rnrn用show struts来查看mysql的状况,除去那些为0的参数,剩下的如下。。。有哪儿可以做优化呢?rnrnAborted_clients 16rnBytes_received 706rnBytes_sent 28208rnCom_set_option 4rnCom_show_databases 1rnCom_show_processlist 19rnCom_show_status 2rnCom_show_variables 1rnCompression OFFrnConnections 44259rnCreated_tmp_files 17221rnCreated_tmp_tables 4rnFlush_commands 1rnHandler_read_rnd_next 261rnHandler_write 390rnInnodb_buffer_pool_pages_data 64rnInnodb_buffer_pool_pages_free 1984rnInnodb_buffer_pool_pages_total 2048rnInnodb_buffer_pool_read_ahead_rnd 1rnInnodb_buffer_pool_read_requests 320rnInnodb_buffer_pool_reads 13rnInnodb_data_fsyncs 3rnInnodb_data_read 3231744rnInnodb_data_reads 74rnInnodb_data_writes 3rnInnodb_data_written 1536rnInnodb_log_writes 1rnInnodb_os_log_fsyncs 3rnInnodb_os_log_written 512rnInnodb_page_size 16384rnInnodb_pages_read 64rnKey_blocks_unused 10590rnKey_blocks_used 4262rnKey_read_requests 95374528rnKey_reads 83870rnKey_write_requests 24881rnKey_writes 18930rnLast_query_cost 10.499rnMax_used_connections 32rnOpen_files 24rnOpen_tables 18rnQcache_free_blocks 1568rnQcache_free_memory 11651136rnQcache_hits 310761rnQcache_inserts 133160rnQcache_lowmem_prunes 4209rnQcache_not_cached 29571rnQcache_queries_in_cache 18419rnQcache_total_blocks 38656rnQuestions 628419rnRpl_status NULLrnSelect_scan 4rnSlave_running OFFrnSsl_session_cache_mode NONErnTable_locks_immediate 156256rnTable_locks_waited 20685rnThreads_cached 24rnThreads_connected 8rnThreads_created 32rnThreads_running 4rnUptime 877167rnUptime_since_flush_status 877167rn 论坛

没有更多推荐了,返回首页