Tag Archives: mysql

java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space

### Cause: java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space… (errno: 28 “No space left on device”)
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1021]; Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space… (errno: 28 “No space left on device”); nested exception is java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space… (errno: 28 “No space left on device”)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy17.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy43.getSumMoney(Unknown Source)
at com.sprucetec.fi.posc.manager.impl.PeManagerImpl.getSumMoney(PeManagerImpl.java:344)
at com.sprucetec.fi.posc.manager.impl.PeManagerImpl$$FastClassBySpringCGLIB$$3352c52a.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:649)
at com.sprucetec.fi.posc.manager.impl.PeManagerImpl$$EnhancerBySpringCGLIB$$1d0d0a07.getSumMoney()
at com.sprucetec.fi.posc.service.ReturnGoodsServiceImpl.getPoscBalance(ReturnGoodsServiceImpl.java:231)
at com.sprucetec.fi.posc.service.ReturnGoodsServiceImpl.getSupplierBalanceInneer(ReturnGoodsServiceImpl.java:197)
at com.sprucetec.fi.posc.service.ReturnGoodsServiceImpl.getSupplierBalance(ReturnGoodsServiceImpl.java:174)
at com.sprucetec.fi.posc.service.ReturnGoodsServiceImpl.getSupplierBlance(ReturnGoodsServiceImpl.java:108)
at com.alibaba.dubbo.common.bytecode.Wrapper30.invokeMethod(Wrapper30.java)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:46)
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:72)
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:64)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.sprucetec.hawkeye.sdk.metric.dubbo.ServiceMetricFilter.invoke(ServiceMetricFilter.java:46)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.sprucetec.hawkeye.sdk.trace.dubbo.ProviderTraceFilter.invoke(ProviderTraceFilter.java:61)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:70)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:132)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:113)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:84)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:170)
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52)
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space… (errno: 28 “No space left on device”)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:959)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:62)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:78)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
at sun.reflect.GeneratedMethodAccessor282.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
… 45 more

 

Causes the temporary table space to increase mainly used in the following cases.
1, order by or group by (sorting takes the major part).
2, the creation and reconstruction of indexes.
3、distinct operation.
4, union & intersect & minus sort-merge joins.
5、Analyze operations.
6, some exceptions can also cause a spike in TEMP.
Solutions.
1, increase the temporary tablespace
2, targeted problem solving

Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0

1、 Error analysis

It can be seen from the error prompt that the actual parameters passed in are larger than the parameters to be set in SQL, that is, the parameters in SQL?Less than parameter or?There is no
cause at all

? The number is surrounded by single quotation marks

For example:

sql += " and article_title like '%#{articleTitle}%'";

2、 Solutions

Remove single quotes

The above SQL is changed to:

sql += " and article_title like concat('%',#{articleTitle},'%')";

ERROR 2000 (HY000): Unknown MySQL error

After the installation of mysql5.7 physical machine, modify the binlog log in my.cnf, restart mysql, log in and connect to MySQL with the client of the machine, and report error 2000 (HY000): unknown MySQL error. This error will also be reported when mysqldump exports data of all tables,

solve:

1. When using systemctl restart mysqld, you can’t connect by using Navicat, but after using systemctl stop mysqld, you can connect by using systemctl start mysqld, but you still can’t export data by using mysqldump connection.

2. Directly back up the data file on MySQL, and then use docker to install mysql5.7, copy the data file to/var/lib/MySQL, a permission error will be reported, and then change the permission to chown mysql:mysql datadir Can be used normally, user name root password root

reference resources: https://dba.stackexchange.com/questions/91712/whats-causing-this-error-2000-hy000-unknown-mysql-error

Install MySQL ODBC connector prompt error 1918 perfect solution (non installation of VC + + library method)

Local environment:
operating system – windows7 32 bit
MYSQL version – MYSQL Ver 14.14 Distrib 5.7.25, for Win32 (AMD64)
Execution process:

    start – control panel – systems and security – management tools – data source (ODBC) wanted to add MYSQL, found that MYSQL could not be found. An error was reported during the installation of mysql-Connector-ODBc-8.0.15-Win32 (mysql 5.7 supported) on the official website.

Error contents:

Error installing ODBC driver MySQL ODBC5.3 ANSI
Driver,ODBC error 13:Unable to load MySQL ODBC5.3 ANSI Driver ODBC driver
Installation routine, because there is a system error code 126: ... \Myodbc5S.dll) cannot find the specified module.

Solutions:
Solution 1: general online solution: install Microsoft Visual C++ 2013 Redistributable Package above. Verification results: Installing mysql-Connector-ODBC still prompts for the same error message after the following three versions are installed on the machine.

Microsoft Visual C++ 2015 Redistributable Package
Microsoft Visual C++ 2013 Redistributable Package
Microsoft Visual C++ 2010 Redistributable Package

Solution 2: Replace the lower version of mysql-Connector-ODBC. Try installing mysql-connector-odbc-5.1.13-win32.msi verification solution :(the current environment has all three versions of vc++ installed) install the lower version (5.1.13) successfully! The ODBC data source manager was able to successfully create the user data source.

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your

Error: ERROR 1064 (42000): 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 ‘‘stock’(
‘id’ int unsigned auto_increment,
‘number’ int (10) not null,
‘name’ va’ at line 1

The reason for this is that the quotation marks should be used for the reason that the English quotation marks, i.e., the – symbol in the key below the esc key on the keyboard has a ~ and – key, are used as quotation marks.

Solve the problem that dbvisualizer cannot connect to mysql8

reference resources: https://blog.csdn.net/yeshang_ lady/article/details/108224358

Reason: due to the change of MySQL driver, we need to change the MySQL driver of dbvisualizer.

resolvent:

Step 1: download the MySQL 8 driver. I didn’t find the address of the blog post above. I used Maven to download it. Just build a maven project. Enter the address of mysql8 in pom.xml

<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<scope>runtime</scope>
		</dependency>

Then, go to Maven reference to find the package address.

Step 2: put the jar package into the MySQL driver directory of dbvisualizer

Step 3: reconfigure the MySQL driver. As shown in the figure below, delete the original MySQL driver configuration and replace it with a new jar directory

 
Step 4: create a connection:

 
Special note: in the database column, you should not only input the database, but also include the time zone

test?serverTimezone=UTC&characterEncoding=utf-8&useSSL=true

 

Mysqldump: Got error: 1045: Access denied for user ‘root‘@‘localhost‘

(using password: NO) when trying to connect,mysqldump: [Warning] Using a password on the command line interface can be insecure,mysqldump Export error,linux export mysql database error mysqldump:got error:1045

mysqld Ver 5.7.24 for Linux on x86_64 (MySQL Community Server (GPL))

Edit mysql configuration file

vim /etc/my.cnf


Analysis of reasons:
Verify that the username and password are correct. The password contains special symbols (such as ~! @$%^& *()_ etc.) Remember to wrap the “password” in quotation marks, or consider changing the password to try to locate the problem.

The solution of duplicate entry ‘for key’ primary ‘when inserting data in MySQL

The problem is the key duplication encountered in inserting data table.
solution:
1. Using ignore, if there are duplicate values in the inserted record, the record row with duplicate values will be ignored, and the insertion of other rows will not be affected.

INSERT IGNORE INTO Table_name(…..) VALUES(1,1),(2,2),(3,3);

2. Use replace to delete the duplicate record row in the table before inserting when the inserted record encounters primary key or unique duplicate

REPLACE INTO Table_name() VALUES(1,1),(2,2),(3,3)

3. Using values after on duplicate key update refers to the value of the inserted record, while not using values refers to the value of the table itself. The record of the subsequent update is the ID of the duplicate primary key or unique key where.

NSERT TO Table_name() VALUES(1,1),(1,2) ON DUPLICATE KEY UPDATE NAME1=NAME1+1;

Download: https://blog.csdn.net/zhangyr_student/article/details/80119238

Mysql Script Error Code: 1136. Column count doesn’t match value count at row 1

Running mysql script during development, mysql prompts Column count doesn’t match value count at row 1 error. After sticking, it is found that the number of columns in the SQL statement is inconsistent with the number of subsequent values. For example, insert into table names (field1,field2,field3) values(‘a’,’b’).

Solve ERROR 1136 (21S01) in Mysql: Column count doesn’t match value count at row 1

The problem is that when a new row is inserted, an error is returned.
type:

mysql> insert into students values(1,"goutou",18,"male",12121);

Returns:

ERROR 1136 (21S01): Column count doesn't match value count at row 1

check statement is ok. Considering the previous operation of deleting a column, two new columns are added, and the input is:

mysql> insert into students(id,name,age,gender,clc_id) values(0,"zhutou",12,"male",12121);
Query OK, 1 row affected (0.06 sec)

 

Mybatis Error: The server time zone value ‘����1532a0’ is unrecognized

The first time to install and use mybatis, problems encountered are as follows:

Question 1: Unkonwn database ‘test’

I created a new test database in my own database, and the corresponding table name, the problem was solved. However, what I want to understand is: how to specify which database and which table to use in the XML configuration file, otherwise, this problem will appear.

Question 2: The server time zone value ‘appears in MySQL й ��� ׼ʱ ‘is unrecognized record

Solution 1: modify the database time zone
set global time_ zone = ‘+8:00’; ## Modify the global time zone of Mysql to Beijing time, that is, the East 8 district where we are
in the database   set time_ zone = ‘+8:00’; ## Modify the time zone of the current session
0   flush privileges; # Effective immediately

Solution 2: modify the value of driver and URL.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Pay attention to this configuration header tag, don't make a mistake -->
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

    <environments default="bank">
        <environment id="bank">
            <!-- Using jdbc transaction management -->
            <transactionManager type="JDBC" />
            <!-- Database connection pooling -->
            <dataSource type="POOLED">
                <property name="driver" value="com.mysql.cj.jdbc.Driver" />  
                <property name="url"
                          value="jdbc:mysql://localhost:3306/test?characterEncoding=utf-8" />
                <property name="username" value="root" />
                <property name="password" value="123456" />
            </dataSource>
        </environment>
    </environments>

    <!-- This place configures the entity class sql mapping file -->
    <mappers>
        <mapper resource="pufaSpring\otherMybatis\UserMapper.xml"/>

    </mappers>
</configuration>