MySQL Error :SHOW PROFILES

本文介绍了解决SQLyog Enterprise V8.1英文版在执行SQL语句时频繁弹出关于'SHOW PROFILES'功能未启用提示的问题。通过调整SQLyog的配置,可以在不影响MySQL 5.0.17版本的情况下,避免该提示出现。
在使用SQLyog Enterprise V8.1 英文版的时候,执行一个sql 语句,总会先弹出一个对话框,显示如下信息:

1
2
3
Error number:1289
Error message:
The 'SHOW PROFILES' feature is disabled; you need MySQL built with 'enable-profiling' to have it working


意思呢就是说编译时没有激活enable-profiling选项。
其实你点击了Ok以后,sql语句会正常执行。只不过每次都点,让人觉得很烦。

终于找到了原因:
1 MySQL从5.0.37起,提供了profile的功能。
2 我的MySQL是5.0.17,而我的SQLyog是8.1。
3 在SQLyog8.1中,默认的是对profile提供支持的,也就是说有其对各中参数的设置。

所以呢,解决方法就在SQLyog中找。
tools -> preferences -> power tools ->Enables Query Fifles 中,去掉 show profiles 前面的勾即可。

这位老兄说的比较详细,可以看一下:
【http://www.ourmysql.com/archives/785】

在springboot项目中配置多数据源,配置文件如下所示: spring: data: cassandra: local-datacenter: datacenter1 profiles: active: mysql grpc: server: port: 9091 system: max-user-limit: 10 management: endpoints: web: exposure: include: metrics # ==================== MySQL 配置 ==================== --- spring: config: activate: on-profile: mysql datasource: url: jdbc:mysql://localhost:3306/springbootdemo?useSSL=false&serverTimezone=UTC&characterEncoding=utf8 username: root password: 159357 driver-class-name: com.mysql.cj.jdbc.Driver jpa: show-sql: true hibernate: ddl-auto: update properties: hibernate: dialect: org.hibernate.dialect.MySQL8Dialect format_sql: true jdbc: lob: non_contextual_creation: true # ==================== Cassandra 配置 ==================== --- spring: config: activate: on-profile: cassandra # 激活cassandra profile时使用此配置 data: cassandra: keyspace-name: my_database local-datacenter: datacenter1 contact-points: localhost port: 9042 # 默认Cassandra端口 compression: none schema-action: CREATE_IF_NOT_EXISTS connection: connect-timeout: 10s init-query-timeout: 10s autoconfigure: exclude: - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration # 排除JDBC自动配置 - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration # 排除JPA自动配置 # ==================== MongoDB 配置 ==================== --- spring: config: activate: on-profile: mongodb data: mongodb: host: localhost port: 27017 database: my_database 切换了数据源后启动项目报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraUserRepository' defined in com.tplink.nbu.demo.basicspringboot.repository.CassandraUserRepository defined in @EnableCassandraRepositories declared on BasicSpringBootApplication: Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraSession' defined in class path resource [org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.datastax.oss.driver.api.core.CqlSession]: Factory method 'cassandraSession' threw exception; nested exception is com.datastax.oss.driver.api.core.AllNodesFailedException: Could not reach any contact point, make sure you've provided valid addresses (showing first 1 nodes, use getAllErrors() for more): Node(endPoint=/127.0.0.1:9042, hostId=null, hashCode=1db8c4a1): [com.datastax.oss.driver.api.core.connection.ConnectionInitException: [s0|control|connecting...] Protocol initialization request, step 1 (OPTIONS): failed to send request (io.netty.channel.StacklessClosedChannelException)] 原因是什么,如何解决
最新发布
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值