mysql5.7 版本,执行SQL 报1055

ONLY_FULL_GROUP_BY 不是只有分组查询时,不按照group by 的约束查询返回才会报1055 错误吗,现在我就写一个普通查询,比如select * from table; 也会报1055,虽说查询结果会返回,但是这个报错还是会出现,这是怎么回事

2个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
windows下MySQL5.7.19无法启动日志是为什么
安装的是解压缩版的MySQL5.7.19,可以正常启动和进入mysql,但是一直无法启动日志, ![图片说明](https://img-ask.csdn.net/upload/201709/20/1505890481_954674.png) 以下是我的my.ini内容,希望各路大神能够指导一下我: # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [client] default-character-set=utf8 [mysqld] port=3306 log-bin =mysql-bin default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_general_ci basedir ="E:\MySQL\mysql-5.7.19-winx64/" datadir ="E:\MySQL\mysql-5.7.19-winx64/data/" tmpdir ="E:\MySQL\mysql-5.7.19-winx64/data/" socket ="E:\MySQL\mysql-5.7.19-winx64/data/mysql.sock" log-error="E:\MySQL\mysql-5.7.19-winx64/data/mysql_error.log" server-id =1 #skip-locking max_connections=100 table_open_cache=256 query_cache_size=1M tmp_table_size=32M thread_cache_size=8 innodb_data_home_dir="E:\MySQL\mysql-5.7.19-winx64/data/" innodb_flush_log_at_trx_commit =1 innodb_log_buffer_size=128M innodb_buffer_pool_size=128M innodb_log_file_size=10M innodb_thread_concurrency=16 innodb-autoextend-increment=1000 join_buffer_size = 128M sort_buffer_size = 32M read_rnd_buffer_size = 32M max_allowed_packet = 32M explicit_defaults_for_timestamp=true sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" skip-grant-tables #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
相同的sql语句mysql5.7分组groupby得到的结果和本地不一样
sql代码如下: select user_id,report_store_user_id,create_time from (select id,user_id,report_store_user_id,create_time from tb_store_user_report order by `id` desc ) as i group by user_id 本地数据和测试服务器的数据是一样的。mysql版本本地是mysql5.6.25,服务器是5.7.9, 执行相同的语句但是得到的结果却是不一样,这是为什么呢? ![本地5.6结果](https://img-ask.csdn.net/upload/201607/18/1468826533_805322.png) ![服务器5.7结果](https://img-ask.csdn.net/upload/201607/18/1468826601_130944.png)
MySQL5.7.21 msi安装的问题
安装时候到启动服务时候,服务启动不了,![图片说明](https://img-ask.csdn.net/upload/201802/23/1519380310_610360.png)![图片说明](https://img-ask.csdn.net/upload/201802/23/1519380339_64588.png) Beginning configuration step: Stopping Server [if necessary] Ended configuration step: Stopping Server [if necessary] Beginning configuration step: Writing configuration file Ended configuration step: Writing configuration file Beginning configuration step: Updating firewall Attempting to create firewall rule with command: netsh.exe firewall delete portopening protocol=TCP port=3306 profile=ALL Adding firewall rule for MySQL on port 3306. Attempting to create firewall rule with command: netsh.exe firewall add portopening protocol=TCP port=3306 profile=ALL name=MySQL mode=ENABLE scope=ALL Successfully added firewall rule. Ended configuration step: Updating firewall Beginning configuration step: Adjusting Windows service [if necessary] Attempting to grant Network Service require filesystem permissions. Granted permissions. Adding new service New service added Ended configuration step: Adjusting Windows service [if necessary] Beginning configuration step: Initializing Database [if necessary] Deleting the data directory from a previous (failed) configuration... Attempting to run MySQL Server with --initialize-insecure option... Starting process for MySQL Server 5.7.21... Starting process with command: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --console --initialize-insecure=on... 2018-02-23T09:51:19.100633Z 0 [Warning] option 'read_buffer_size': unsigned value 0 adjusted to 8192 2018-02-23T09:51:19.100738Z 0 [Warning] option 'read_rnd_buffer_size': unsigned value 0 adjusted to 1 2018-02-23T09:51:19.100841Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-02-23T09:51:19.100862Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2018-02-23T09:51:21.155766Z 0 [Warning] InnoDB: New log files created, LSN=45790 2018-02-23T09:51:21.636909Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. mysqld: File '.\鍒樹繆宀?slow.log' not found (Errcode: 2 - No such file or directory) 2018-02-23T09:51:21.886656Z 0 [ERROR] Could not use 鍒樹繆宀?slow.log for logging (error 2 - No such file or directory). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL SLOW_QUERY_LOG=ON" or restart the MySQL server. 2018-02-23T09:51:21.892115Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 1a7a0638-187f-11e8-b26e-3417eb5b6dd1. 2018-02-23T09:51:21.951880Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2018-02-23T09:51:21.954100Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. Process for mysqld, with ID 952, was started successfully and exited with code 0. MySQL Server 5.7.21 intialized the database successfully. Ended configuration step: Initializing Database [if necessary] Beginning configuration step: Starting Server Attempting to start service MySQL
win10 mysql 5.7.17 安装卡在starting server
win 10 mysql5.7.17 安装卡在starting server,网上找了很多方法,比如用本地系统账户手动启动,或者删除注册表重装,还有更改my.ini,都没有用。 按照网上的说法也没有找到.err文件,结果发现这个文件直接显示在安装界面上了(尴尬) 下面是log Beginning configuration step: Stopping Server [if necessary] Ended configuration step: Stopping Server [if necessary] Beginning configuration step: Writing configuration file Ended configuration step: Writing configuration file Beginning configuration step: Updating firewall Adding firewall rule for MySQL57 on port 3306. Successfully added firewall rule. Ended configuration step: Updating firewall Beginning configuration step: Adjusting Windows service [if necessary] Attempting to grant Network Service require filesystem permissions. Granted permissions. Adding new service New service added Ended configuration step: Adjusting Windows service [if necessary] Beginning configuration step: Initializing Database [if necessary] Deleting Data folder shipped Attempting to run MySQL Server with --Initialize-insecure Running process: F:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="F:\Program Files\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console Waiting for the server stops: F:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="F:\Program Files\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console 2017-09-18T13:50:15.638257Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-09-18T13:50:15.638257Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2017-09-18T13:50:25.360635Z 0 [Warning] InnoDB: New log files created, LSN=45790 2017-09-18T13:50:25.907212Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. mysqld: File '.\褰煎コ銇█銇勩伨銇?slow.log' not found (Errcode: 2 - No such file or directory) 2017-09-18T13:50:26.125979Z 0 [ERROR] Could not use 褰煎コ銇█銇勩伨銇?slow.log for logging (error 2 - No such file or directory). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL SLOW_QUERY_LOG=ON" or restart the MySQL server. 2017-09-18T13:50:26.141566Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 530d3483-9c78-11e7-9ec9-54e1ad2321ad. 2017-09-18T13:50:26.188451Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2017-09-18T13:50:26.204073Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. Finished initialize database Ended configuration step: Initializing Database [if necessary] Beginning configuration step: Starting Server Starting MySQL as a service 路径有问题,是乱码,但是我的安装路径是全英文的,mysqld能在文件夹下找到,在dos下也启动不了。 使用它的默认路径也还是这个问题。
mysql5.7 sql_mode设置后的疑问
当我在MySQL命令行的客户端设置sql_mode后,my.cnf里并未指定sql_mode(也就是说之前是用的5.7的默认模式),退出客户端再连接进来时出现sql_mode为空的现象,见下图一和下图二,这是什么原因呢? 设置时: mysql> set @@GLOBAL.sql_mode=''; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected (0.00 sec) 重新连接后: mysql> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec)
MySQL 5.7.10 安装出错 卡在Starthing Server
Beginning configuration step: Stopping Server [if necessary] Ended configuration step: Stopping Server [if necessary] Beginning configuration step: Writing configuration file Ended configuration step: Writing configuration file Beginning configuration step: Updating firewall Adding firewall rule for MySQL on port 3306. Successfully added firewall rule. Ended configuration step: Updating firewall Beginning configuration step: Adjusting Windows service [if necessary] Attempting to grant Network Service require filesystem permissions. Granted permissions. Adding new service New service added Ended configuration step: Adjusting Windows service [if necessary] Beginning configuration step: Initializing Database [if necessary] Deleting Data folder shipped Attempting to run MySQL Server with --Initialize-insecure Running process: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console Waiting for the server stops: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console 2018-11-28T12:11:16.375762Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-11-28T12:11:16.375762Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2018-11-28T12:11:17.263963Z 0 [Warning] InnoDB: New log files created, LSN=45790 2018-11-28T12:11:17.400637Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. mysqld: File '.\ZHANG浠欏効妫?slow.log' not found (Errcode: 2 - No such file or directory) 2018-11-28T12:11:17.474952Z 0 [ERROR] Could not use ZHANG浠欏効妫?slow.log for logging (error 2 - No such file or directory). Turning logging off for the server process. To turn it on again: fix the cause, then either restart the query logging by using "SET GLOBAL SLOW_QUERY_LOG=ON" or restart the MySQL server. 2018-11-28T12:11:17.502827Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: b57c99e4-f306-11e8-871f-2c600cb8cb6f. 2018-11-28T12:11:17.510888Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2018-11-28T12:11:17.510888Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. Finished initialize database Ended configuration step: Initializing Database [if necessary] Beginning configuration step: Starting Server Starting MySQL as a service 提问:我之前电脑装过MySQL ,系统还原过一次,然后卸载了,注册表,服务全都删了,有哪位大神知道怎么解决? 才能顺利安装
windows 以 zip 安装 mysql 5.7.9 innodb 一直无法启用
2015-12-08T04:29:25.523685Z 0 [Warning] Insecure configuration for --secure-file -priv: Current value does not restrict location of generated files. Consider set ting it to a valid, non-empty path. 2015-12-08T04:29:25.524685Z 0 [Note] mysqld (mysqld 5.7.10) starting as process 8524 ... 2015-12-08T04:29:25.536686Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows in terlocked functions 2015-12-08T04:29:25.537686Z 0 [Note] InnoDB: Uses event mutexes 2015-12-08T04:29:25.538686Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are u sed for memory barrier 2015-12-08T04:29:25.539686Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-12-08T04:29:25.540686Z 0 [Note] InnoDB: Number of pools: 1 2015-12-08T04:29:25.541686Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2015-12-08T04:29:25.589689Z 0 [Note] InnoDB: Initializing buffer pool, total siz e = 80M, instances = 1, chunk size = 80M 2015-12-08T04:29:25.606690Z 0 [Note] InnoDB: Completed initialization of buffer pool 2015-12-08T04:29:25.640692Z 0 [Note] InnoDB: Highest supported file format is Ba rracuda. 2015-12-08T04:29:25.692695Z 0 [Note] InnoDB: Creating shared tablespace for temp orary tables 2015-12-08T04:29:25.695695Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2015-12-08T04:29:25.728697Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB. 下面是 my.ini # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir ="E:\\data\\mysql-5.7.10-winx64" datadir ="E:\\data\\mysql-5.7.10-winx64\\data" tmpdir ="E:\\data\\mysql-5.7.10-winx64\\temp" port = 3306 # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M socket="E:\\data\\mysql-5.7.10-winx64\\mysql.sock" #skip_innodb innodb_data_file_path=idbdata1:200M:autoextend innodb_buffer_pool_size=80M #innodb_additional_mem_pool_size=2M innodb_log_file_size=20M innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES default_password_lifetime=0
mysql5..7用之前的数据库备份语句发生错误,有人懂吗?
命令如下: F:\MySQL\MySQL Server 5.7\bin>mysqldump -u root -p student > d:/dd.sql 发生如下错误: mysqldump: [ERROR] unknown option '--no-beep'
CentOS7下的MySQL5.7.28怎么更改字符集为UTF-8
最近写好的web项目打算打包在Linux环境下运行,在虚拟机装JDK、Tomcat MySQL后,数据库连接也成功了,但是运行项目的时候,连接windows环境下 的MySQL数据库项目运行正常,连接Linux环境下的MySQL数据库运行项目时中文会出现乱码,查了一下说的是数据库字符集的问题。 windows下: ![图片说明](https://img-ask.csdn.net/upload/202003/05/1583405363_306613.png) linux下:![图片说明](https://img-ask.csdn.net/upload/202003/05/1583405390_969134.png) 查了下网上的解决方案: 1.修改配置文件/etc/my.cnf 2.将my-medium.cnf 移动到etc 并且改名为my.cnf 但问题是。。。。我没有找到这两个文件阿,那怎么更改字符集呢?
CentOS7下的MySQL5.7.28怎么更改字符集为UTF-8?
JavaWeb项目打算运行在Linux环境下,装好JDK、tomcat、MySQL后。 运行项目连接Windows环境下的数据库没问题,连接Linux环境下出现乱码。 查了说是字符集的问题。 Windows:![图片说明](https://img-ask.csdn.net/upload/202003/05/1583408859_132066.png) LInux:![图片说明](https://img-ask.csdn.net/upload/202003/05/1583408882_777132.png) 网上的解决方案都是修改配置文件 /etc/my.cnf 但是我在系统中找不到这个文件? 怎么解决这个问题呢?
在线等!!!linux服务器连接mysql5.7数据库报错 Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException
以下是服务器上的报错代码 ![图片说明](https://img-ask.csdn.net/upload/201911/12/1573526989_375593.png) ``` >org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 1000, active 0, maxActive 500, creating 1 ``` 问题就是出在这里. 1,本地项目正常启动,无任何报错,数据库连接正常(使用的都是linux上面的数据库). ![图片说明](https://img-ask.csdn.net/upload/201911/12/1573527132_402324.png) 2,数据库工具使用无任何问题 ![图片说明](https://img-ask.csdn.net/upload/201911/12/1573527246_699888.png) 3,下面放出jdbc配置文件和spring配置文件 ``` jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://..XXXXXX.:/XXXXXX?useUnicode=true&characterEncoding=UTF-8&useSSL=false jdbc.username=xxxx jdbc.password=xxxxx jdbc.filters=stat jdbc.maxActive=500 jdbc.initialSize=1 jdbc.maxWait=1000 jdbc.minIdle=10 jdbc.maxIdle=15 jdbc.timeBetweenEvictionRunsMillis=60000 jdbc.minEvictableIdleTimeMillis=300000 jdbc.validationQuery=SELECT 'x' jdbc.testWhileIdle=true jdbc.testOnBorrow=false jdbc.testOnReturn=false jdbc.maxOpenPreparedStatements=20 jdbc.removeAbandoned=true jdbc.removeAbandonedTimeout=180 jdbc.logAbandoned=true ``` spring 配置 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <!-- 扫描service包下所有使用注解的类型 --> <context:component-scan base-package="com.yoFish.service"/> <!-- 配置数据库相关参数properties的属性:${url} --> <context:property-placeholder location="classpath:jdbc.properties"/> <!-- 阿里 druid 数据库连接池 --> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close"> <!-- 数据库基本信息配置 --> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <property name="filters" value="${jdbc.filters}"/> <!-- 最大并发连接数 --> <property name="maxActive" value="${jdbc.maxActive}"/> <!-- 初始化连接数量 --> <property name="initialSize" value="${jdbc.initialSize}"/> <!-- 配置获取连接等待超时的时间 --> <property name="maxWait" value="${jdbc.maxWait}"/> <!-- 最小空闲连接数 --> <property name="minIdle" value="${jdbc.minIdle}"/> <!-- 最大空闲连接数 --> <property name="maxIdle" value="${jdbc.maxIdle}"/> <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 --> <property name="timeBetweenEvictionRunsMillis" value="${jdbc.timeBetweenEvictionRunsMillis}"/> <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 --> <property name="minEvictableIdleTimeMillis" value="${jdbc.minEvictableIdleTimeMillis}"/> <property name="validationQuery" value="${jdbc.validationQuery}"/> <property name="testWhileIdle" value="${jdbc.testWhileIdle}"/> <property name="testOnBorrow" value="${jdbc.testOnBorrow}"/> <property name="testOnReturn" value="${jdbc.testOnReturn}"/> <property name="maxOpenPreparedStatements" value="${jdbc.maxOpenPreparedStatements}"/> <!-- 超过时间限制是否回收 --> <property name="removeAbandoned" value="${jdbc.removeAbandoned}"/> <!-- 1800 秒,也就是 30 分钟 --> <property name="removeAbandonedTimeout" value="${jdbc.removeAbandonedTimeout}"/> <!-- 关闭 abanded 连接时输出错误日志 --> <property name="logAbandoned" value="${jdbc.logAbandoned}"/> </bean> <!-- 配置SqlSessionFactory对象 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <!-- 注入数据库连接池 --> <property name="dataSource" ref="dataSource"/> <!-- 扫描model包 使用别名 --> <property name="typeAliasesPackage" value="com.yoFish.model"/> <!-- 扫描sql配置文件:mapper需要的xml文件 --> <property name="mapperLocations" value="classpath:mapper/*.xml"/> </bean> <!-- 配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- 注入sqlSessionFactory --> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/> <!-- 给出需要扫描Dao接口包 --> <property name="basePackage" value="com.yoFish.dao"/> </bean> <!-- 配置事务管理器 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <!-- 注入数据库连接池 --> <property name="dataSource" ref="dataSource"/> </bean> <!-- 配置基于注解的声明式事务 --> <tx:annotation-driven transaction-manager="transactionManager"/> </beans> ``` 这个问题搞了很久了,主要就是不知道问题在哪,本地真的是没有任何问题,很多方式我也试过了.很头疼,求大佬帮忙解决
mysql5.7虚拟列无法设置默认值的吗?
今天使用mysql5.7.11,想对json的操作进行测试。我首先创建了一个带有json类型的表,然后对json中的某个key建立虚拟列,然后对这个虚拟列创建索引(学习网址:http://blog.csdn.net/wuzuodingfeng/article/details/53693209)。 最后我突然发现了一个问题,如何某个json中没有这个key,那么创建的索引对应的值就是NULL,这会破坏索引的效率啊。于是我想当这个key不存在的时候,给一个默认值,例如int时为0,varchar时为“”,可是我给这个虚拟列设置默认值时,一直报错,我的代码如下: - - 我的json串如下(json串对应的列名叫model): [{"_id": "e030c0e8-e99a-405d-999e-71e6e0dc4f2f", "name": "优秀", "model_id": "bb3cd414-5aaa-4f5a-bf93-1c8953dc0bea", "end_score": 100, "begin_score": 439057}, {"_id": "dd59da28-f50b-4184-9589-c1fa6f7a414e", "name": "合格", "model_id": "bb3cd414-5aaa-4f5a-bf93-1c8953dc0bea", "end_score": 89}] -- 创建虚拟列的sql ALTER TABLE qc_model ADD begin_sore_virtual int (4) DEFAULT 0 GENERATED ALWAYS AS (json_extract(model, '$[0]."begin_score"')) VIRTUAL; -- 创建索引的sql ALTER TABLE qc_model INDEX begin_sore_index(begin_sore_virtual); (感谢大家的回复)
mysql5.7用EXPLAIN分析sql时关于索引的疑问
分析sql及表结构如下 MySQL > EXPLAIN SELECT COUNT(UA.id) AS tp_count FROM ck_user_audit UA RIGHT JOIN ck_user AS U ON U.id = UA.uid LIMIT 1; +----+-------------+-------+------------+-------+---------------+------+---------+------+-------+----------+----------------------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+-------+---------------+------+---------+------+-------+----------+----------------------------------------------------+ *| 1 | SIMPLE | U | NULL | index | NULL | pid | 5 | NULL | 23003 | 100.00 | Using index | | 1 | SIMPLE | UA | NULL | ALL | NULL | NULL | NULL | NULL | 3304 | 100.00 | Using where; Using join buffer (Block Nested Loop) | +----+-------------+-------+------------+-------+---------------+------+---------+------+-------+----------+----------------------------------------------------+ MySQL > desc ck_user; +-----------------+---------------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+---------------------+------+-----+------------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | phone | char(50) | YES | MUL | NULL | | | pid | int(10) | YES | MUL | NULL | | | email | char(100) | YES | MUL | NULL | | ---------------------------------------------------------------------------- 执行sql用的是id这个主键,为什么分析出来却显示用的是pid这个索引?
Mysql5.7.18 存储过程跨日处理 求助!
1、需求:(周四、周五)凌晨处理3天前数据,(周一、周二、周三)凌晨处理5天前数据,周六周日不处理; 2、请问如何修改下列存储过程? ``` /* Mysql5.7.18 */ CREATE PROCEDURE increase_available() p: begin -- 开始存储过程 declare current_product_code varchar(32); -- 产品代码 declare current_userid INT(11); -- 用户ID declare current_verify_time INT(11); -- 审核时间 declare current_amount INT(11); -- 交易数量 declare handle_day INT(11); -- 处理日 declare handle_day_before INT(11); -- 处理日(前一天) -- 交易审核的起始时间:三天前 -- start_date = unix_timestamp(DATE_ADD(date(CURDATE()),INTERVAL -3 DAY)); -- 交易审核的结束时间:二天前 -- end_date = unix_timestamp(DATE_ADD(date(CURDATE()),INTERVAL -2 DAY)); DECLARE done INT DEFAULT FALSE; -- 自定义控制游标循环,默认false -- 按T+3日处理,周六、周日不处理。 -- 当前周四处理周一的数据, if DAYOFWEEK(CURDATE()) = 5 then set @handle_day = 3, @handle_day_before = 2; -- 当前周五处理周二的数据 elseif DAYOFWEEK(CURDATE()) = 6 then set @handle_day = 3, @handle_day_before = 2; -- 当前下周一处理上周三的数据 elseif DAYOFWEEK(CURDATE()) = 2 then set @handle_day = 5, @handle_day_before = 4; -- 当前下周二处理上周四的数据 elseif DAYOFWEEK(CURDATE()) = 3 then set @handle_day = 5, @handle_day_before = 4; -- 当前下周三处理上周五的数据 elseif DAYOFWEEK(CURDATE()) = 4 then set @handle_day = 5, @handle_day_before = 4; else -- 周六、周日不处理,不执行存储过程 LEAVE p; end if; DECLARE My_Cursor CURSOR FOR ( SELECT product_code, userid, amount, verify_time FROM oa_option_transactions WHERE type= 1 and `status`=2 and verify_time >= unix_timestamp(DATE_ADD(date(CURDATE()),INTERVAL - @handle_day DAY)) and verify_time < unix_timestamp(DATE_ADD(date(CURDATE()),INTERVAL - @handle_day_before DAY)) ); -- 定义游标并输入结果集 DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; -- 绑定控制到游标,游标循环结束自动转true OPEN My_Cursor; -- 打开游标 myLoop: LOOP -- 开始循环体,myLoop为自定义循环名,结束循环时用到 FETCH My_Cursor into current_product_code, current_userid, ,current_amount, current_verify_time; -- 将游标当前读取行的数据顺序赋予自定义 IF done THEN -- 判断是否继续循环 LEAVE myLoop; -- 结束循环 END IF; -- 自己要做的事情,在 sql 中直接使用自定义即可 UPDATE oa_option_holdings SET available = available + current_amount WHERE product_code = current_product_code and user_id = current_userid; -- COMMIT; -- 提交事务 END LOOP myLoop; -- 结束自定义循环体 CLOSE My_Cursor; -- 关闭游标 END ```
MyEclipse8.5 连接MYSQL5.5数据库的问题
<p>您好!我用MyEclipse8.5 + MySQL5.5 + win7环境下编写程序测试连接数据库的程序。但是出现以下问题:<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:148)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testInsert(jdbcTest1.java:62)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:149)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:150)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testUpdate(jdbcTest1.java:98)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:151)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:152)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testDelete(jdbcTest1.java:123)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:153)<br>java.lang.ClassNotFoundException: com.MySQL.jdbc.Driver<br> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)<br> at java.security.AccessController.doPrivileged(Native Method)<br> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)<br> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)<br> at java.lang.Class.forName0(Native Method)<br> at java.lang.Class.forName(Class.java:169)<br> at MySQL.jdbcTest1.initJdbc(jdbcTest1.java:10)<br> at MySQL.jdbcTest1.getConnection(jdbcTest1.java:17)<br> at MySQL.jdbcTest1.testQuery(jdbcTest1.java:29)<br> at MySQL.jdbcTest1.main(jdbcTest1.java:154)<br>用mysql-connector-java-5.1.20-bin的jar驱动</p> <p>程序代码如下:package MySQL;</p> <p><br>import java.sql.*;<br>public class jdbcTest1 {</p> <p> boolean bInited=false;<br> //加载驱动<br> public void initJdbc() throws ClassNotFoundException{<br> Class.forName("com.MySQL.jdbc.Driver");<br> bInited=true;<br> }<br> //获得数据库连接<br> public Connection getConnection() throws ClassNotFoundException,<br> SQLException{<br> if(!bInited)<br> initJdbc();<br> return DriverManager<br> .getConnection("jdbc:MySQL://localhost:3306/mytest?user=root&amp;password" +<br> "=mjf10086&amp;useUnicode=true&amp;charaterEncoding=gb2312");<br> //注意,这里的字符集与数据库的设置一致<br> }<br><br> public void testQuery(){<br> Connection conn=null;<br> Statement smt = null;<br> ResultSet rs=null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> String sql = "select*from table1";<br> rs = smt.executeQuery(sql);<br> while(rs.next()){<br> System.out.println("id:"+rs.getInt("_id")+"username:"<br> +rs.getString("_username")+"password:"<br> +rs.getString("_password")+"desc:"<br> +rs.getString("_desc"));<br> }<br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(rs!=null)<br> rs.close();<br> if(smt!=null)<br> smt.close();<br> if(conn!=null)<br> conn.close();<br><br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testInsert(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('马拉多纳','10','阿根廷足球运动员')");<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('坎通纳','7','法国足球运动员')");<br> smt<br> .execute("insert into table1(_username,__password,_desc)values" +<br> "('罗马里奥','11','巴西足球运动员')");<br> smt<br> .execute("insert into table1(_username,_password,_desc)values" +<br> "('古利特','8','荷兰足球运动员')");<br><br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt !=null)<br> smt.close();<br> if(conn !=null)<br> conn.close();<br><br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testUpdate(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt<br> .execute("update table1 set _desc '阿根廷足球球员,一代球王'" +<br> "where _username='马拉多纳'");<br> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt!=null)<br> smt.close();<br> if(conn!=null)<br> conn.close();<br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public void testDelete(){<br> Connection conn = null;<br> Statement smt = null;<br> try{<br> conn = getConnection();<br> smt = conn.createStatement();<br> smt.execute("delete from table1 where _username = '马拉多纳'");<br> smt.execute("delete from table1 where _username = '坎通纳'");<br> smt.execute("delete from table1 where _username = '罗马里奥'");<br> smt.execute("delete from table1 where _username = '古利特'");</p> <p> }catch(SQLException e){<br> e.printStackTrace();<br> }catch(Exception e){<br> e.printStackTrace();<br> }finally{<br> try{<br> if(smt !=null)<br> smt.close();<br> if(conn !=null)<br> conn.close();<br> }catch(Exception e){<br> e.printStackTrace();<br> }<br> }<br> }<br><br> public static void main(String[] args){<br> jdbcTest1 jt1 = new jdbcTest1();<br> jt1.testQuery();<br> jt1.testInsert();<br> jt1.testQuery();<br> jt1.testUpdate();<br> jt1.testQuery();<br> jt1.testDelete();<br> jt1.testQuery();<br> }<br>}</p>
在mysql5.7中实现级联删除,即删除主表中信息的同时删除参照表中对应记录,求大神指导
参照表中设置了级联删除和级联更新但是没有实现。。 上网搜索后用触发器如下 ``` CREATE TRIGGER deleUser_trigger BEFORE DELETE ON users FOR EACH ROW BEGIN DELETE FROM stuinfo WHERE stu_id=old.id; END; ``` 然后。。。报错 ``` You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4 ``` mysql版本5.7 不知道该怎么解决,新手求指导 (另外这一过程也可以在java中实现,但觉得在数据库中实现更好些,所以想在问一下,这两种实现方式有哪些区别吗,是减少java中代码量吗)
Mysql5.7.19交叉编译用于移植ARM时编译出现问题,求助
ometry/util/math.hpp:28, from /root/work/mysql-arm/sql/gis_bg_traits.h:38, from /root/work/mysql-arm/sql/item_geofunc_internal.h:35, from /root/work/mysql-arm/sql/geometry_rtree.cc:16: /usr/bin/locale:16:279: error: expected declaration before ‘}’ token make[2]: *** [sql/CMakeFiles/sql.dir/geometry_rtree.cc.o] Error 1 make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2 make: *** [all] Error 2 源码是mysql-boost-5.7.19.tar.gz 位将源码解压复制成两份,mysql-64/ 、 mysql-arm。一份用于CentOs64位上gcc编译,一份用于交叉编译。编译到45%左右死活过不去。求解 贴上错误log [ 45%] Building CXX object sql/CMakeFiles/sql.dir/geometry_rtree.cc.o In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0, from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54, from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35, from /usr/bin/boost/lexical_cast.hpp:32, from /usr/bin/boost/math/constants/constants.hpp:18, from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28, from /root/work/mysql-arm/sql/gis_bg_traits.h:38, from /root/work/mysql-arm/sql/item_geofunc_internal.h:35, from /root/work/mysql-arm/sql/geometry_rtree.cc:16: /usr/bin/locale:1:1: error: stray â<80><98>\177â<80><99> in program ^?ELF^B^A^Aso.2^BX W H<8b>|$^Hè<93>úÿÿL<89>ÿè[^F^C¾ÿÿÿÿé^FÿÿÿH<89>ëéîþÿÿf<90>f.^O^_<84>tD<84>Àt@Áà^L%^O<84>ÿ^O<84>ÐÆ^AH<83>Á^A<8b>^U _ ëÀH<85>Û^O<84>ÎýÿÿI<89>Åé^Cþÿÿ1Òé.ÿÿÿ<8b>^U<81>^ H<8b><85>PßÿÿL<8d><85><80>ßÿÿL<89>êL)úL<89>ù¿@[@I<8b>6H<8d><95><80>ßÿÿ¿ ^ /usr/bin/locale:1:1: error: stray â<80><98>\2â<80><99> in program ./usr/bin/locale:1:1: error: stray â<80><98>\2â<80><99> in program /usr/bin/locale:1:1: error: stray â<80><98>\1â<80><99> in program /usr/bin/locale:1:1: error: stray â<80><98>\1â<80><99> in program /usr/bin/locale:1:8: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:1: error: stray â<80><98>\2â<80><99> in program /usr/bin/locale:1:18: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:20: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:1: error: stray â<80><98>\1â<80><99> in program /usr/bin/locale:1:22: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:27: error: stray â<80><98>@â<80><99> in program /usr/bin/locale:1:28: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:33: error: stray â<80><98>@â<80><99> in program /usr/bin/locale:1:34: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:1: error: stray â<80><98>\330â<80><99> in program /usr/bin/locale:1:1: error: stray â<80><98>\217â<80><99> in program /usr/bin/locale:1:43: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:53: error: stray â<80><98>@â<80><99> in program /usr/bin/locale:1:54: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:56: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:59: error: stray â<80><98>@â<80><99> in program /usr/bin/locale:1:60: warning: null character(s) ignored [enabled by default] /usr/bin/locale:1:1: error: stray â<80><98>\35â<80><99> in program . . . . . . . from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35, from /usr/bin/boost/lexical_cast.hpp:32, from /usr/bin/boost/math/constants/constants.hpp:18, from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28, from /root/work/mysql-arm/sql/gis_bg_traits.h:38, from /root/work/mysql-arm/sql/item_geofunc_internal.h:35, from /root/work/mysql-arm/sql/geometry_rtree.cc:16: /usr/bin/locale:5:721: error: ‘libc’ does not name a type In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0, from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54, from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35, from /usr/bin/boost/lexical_cast.hpp:32, from /usr/bin/boost/math/constants/constants.hpp:18, from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28, from /root/work/mysql-arm/sql/gis_bg_traits.h:38, from /root/work/mysql-arm/sql/item_geofunc_internal.h:35, from /root/work/mysql-arm/sql/geometry_rtree.cc:16: /usr/bin/locale:12:234: error: expected unqualified-id before numeric constant In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0, from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54, from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35, from /usr/bin/boost/lexical_cast.hpp:32, from /usr/bin/boost/math/constants/constants.hpp:18, from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28, from /root/work/mysql-arm/sql/gis_bg_traits.h:38, from /root/work/mysql-arm/sql/item_geofunc_internal.h:35, from /root/work/mysql-arm/sql/geometry_rtree.cc:16: /usr/bin/locale:16:279: error: expected declaration before ‘}’ token make[2]: *** [sql/CMakeFiles/sql.dir/geometry_rtree.cc.o] Error 1 make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2 make: *** [all] Error 2
mysql5.7 两个并发的select出现相互干扰
java工程,使用c3p0连接池,在晚上会定时执行定时任务, 首先是生成a表的数据(先truncate 在insert select),然后执行 select * from a ,b,c where a.bid = b.id and b.cid = c,id into outfile XXXX(暂名sql1) 突发的一个情况是,执行上述sql1执行期间 有人同时刷系统 在执行select * from b where id in(select id from c where id in (select id from a))的操作。 然后sql1的select语句就会被挂起,一直停留在sending data的状态里 求助大神,这到底是什么原理………………为什么全是select 会出现这种效果。 引擎是innodb,是和buffer配置有关么?
jmeter测试mysql数据库报 通信链路故障 (mysql是5.7的)
Response message: java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)![图片说明](https://img-ask.csdn.net/upload/201912/20/1576842161_100444.png)
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
有网友说:2020年还不懂Spring就放弃Java吧?
前言 Spring这个词对于开发者想必不会陌生,可能你每天都在使用Spring,享受着Spring生态提供的服务,理所当然的用着SpringIOC和SpringAOP去实现老板交给你的功能 ,唔 它就是这样使用的(类声明为Bean组件,然后注入),没错 能完成老板任务,没毛病。如果向你提问什么是Spring,Spring有什么核心功能呢,你会想:这太简单了,Spring就是框架嘛,Spring核...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
没用过这些 IDEA 插件?怪不得写代码头疼
使用插件,可以提高开发效率。对于开发人员很有帮助。这篇博客介绍了IDEA中最常用的一些插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
最全最强!世界大学计算机专业排名总结!
我正在参与CSDN200进20,希望得到您的支持,扫码续投票5次。感谢您! (为表示感谢,您投票后私信我,我把我总结的人工智能手推笔记和思维导图发送给您,感谢!) 目录 泰晤士高等教育世界大学排名 QS 世界大学排名 US News 世界大学排名 世界大学学术排名(Academic Ranking of World Universities) 泰晤士高等教育世界大学排名 中国共...
《java面试宝典》三 类初始化和类实例化顺序
前言: 社长,4年api搬运工程师,之前做的都是一些框架的搬运工作,做的时间越长,越发感觉自己技术越菜,有同感的社友,可以在下方留言。现侧重于java底层学习和算法结构学习,希望自己能改变这种现状。 为什么大厂面试,更侧重于java原理底层的提问,因为通过底层的提问,他能看出一个人的学习能力,看看这个人的可培养潜力。随着springboot的流行,大部分的开发,起步就是springboot。也...
一份王者荣耀的英雄数据报告
咪哥杂谈本篇阅读时间约为 6 分钟。1前言前一阵写了关于王者的一些系列文章,从数据的获取到数据清洗,数据落地,都是为了本篇的铺垫。今天来实现一下,看看不同维度得到的结论。2环境准备本次实...
工作十年的数据分析师被炒,没有方向,你根本躲不过中年危机
2020年刚刚开始,就意味着离职潮高峰的到来,我身边就有不少人拿着年终奖离职了,而最让我感到意外的,是一位工作十年的数据分析师也离职了,不同于别人的主动辞职,他是被公司炒掉的。 很多人都说数据分析是个好饭碗,工作不累薪资高、入门简单又好学。然而今年34的他,却真正尝到了中年危机的滋味,平时也有不少人都会私信问我: 数据分析师也有中年危机吗?跟程序员一样是吃青春饭的吗?该怎么保证自己不被公司淘汰...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
张朝阳回应迟到 1 分钟罚 500:资本家就得剥削员工
loonggg读完需要2分钟速读仅需 1 分钟大家我,我是你们的校长。前几天,搜狐的董事局主席兼 CEO 张朝阳和搜狐都上热搜了。原因很简单,就是搜狐出了“考勤新规”。一封搜狐对员工发布...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
立即提问

相似问题

2
jpa使用@Query查询报错SQL Error: 1064, SQLState: 42000
2
Mariadb 10.3.11 where in 元素个数多个 查询速度慢
1
mysql5.7用EXPLAIN分析sql时关于索引的疑问
1
mysql5.7 sql_mode设置后的疑问
2
cmd可以连接远程数据库,mysql fron 和heidisql连接报错
2
求救org.springframework.jdbc.BadSqlGrammarException
1
Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource一直出现这个错误
4
taotao商城在第二天的进度中出现数据报错,求大佬帮忙看看哪里问题
0
CentOS6.9 (MySql v5.7.22) 使用mysql C API mysql_real_query 导致内存溢出
0
mysql.sock的所有者所属组以及权限全部都是问号?求助神回复如何删除,亦或是如何重建,必有重谢!!!
1
mysql5.7 两个并发的select出现相互干扰
2
使用Mybatis的代码生成器报错java.sql.SQLException: Column 'IS_GENERATEDCOLUMN' not found.
2
【求助】MySQL8.0根据银行流水日记账统计日报表的数据库设计方案。
2
MySQL 对NUMERIC类型数据使用 ROUND函数
2
在线等!!!linux服务器连接mysql5.7数据库报错 Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException
1
安卓开发JDBC连接数据库No static method metafactory错误怎么解决?
2
Mapper.xml 中的 update 方法一直报sql语句的错。
1
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
3
javaweb小项目,写添加功能时出错了检查了几遍sql没找到错误,但从报错信息来看是sql写错了?