Tag Archives: The database

Mysql :error 1111. Invalid use of group function

Invalid use of group function Invalid use of group function
The phenomenon of

Oracle executes double-layer sum without Invalid use of group function, executes the same SQL to mysql, and Invalid use of group function


find the cause
check correct

SELECT [DISTINCT|DISINCTROW|ALL] select_expression,... -- Query results
[FROM table_references -- specify the table for the query
[WHERE where_definition] -- where clause, the filtering condition of the query data
[GROUP BY col_name,...] -- group the query results [that match the where clause]
[HAVING where_definition] -- condition on the grouped results
[ORDER BY{unsigned_integer | col_name | formula} [ASC | DESC],...] -- Sort the query results
[LIMIT [offset,] rows] -- Limit the number of rows to be displayed for a query
[PROCEDURE procedure_name] -- query the result set data returned by the procedure
]

Take a closer look at SQL to locate the two-layer SUM cause

Modify separate SUM, problem solved, the outermost package of a layer

How to Solve mount error(6): No such device or address

Error:

mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Samba server Settings:
[root@test1 ~]#cat /etc/samba/smb.conf
Global Settings:
[global]

    workgroup = test
    server string = Samba Server Version %v
    #log files split per-machine:
    log file = /var/log/samba/log.%m
    #maximum size of 50KB per log file, then rotate:
    max log size = 50
    security = user
    passdb backend = tdbsam
    load printers = no
    cups options = raw

The home Settings
[homes]

    comment = Home Directories
    browseable = no
    writable = yes
    create mode = 0664
    directory =0755

Projects

    comment = smbuser's home
    path    = /share
    browseable = yes
    writable = yes
    write list = @users

3 . font – family: tahoma; mso – bidi – font – family: tahoma;从/etc/samba/smb.Load smb configuration file conf
rlimit_max: increase rlimit_max(1024) to the minimum window limit (16384)
Process section “[homes]”
Processing section “[project]”
Loaded service file OK.
Server role:ROLE_STANDALONE
View service definition dumps by enter
# global parameters
(Global)

    server string = Samba Server Version %v
    workgroup = TEST
    log file = /var/log/samba/log.%m
    max log size = 50
    load printers = No
    security = USER
    idmap config * : backend = tdb
    cups options = raw

(home)

    comment = Home Directories
    path = 0755
    browseable = No
    create mask = 0664
    read only = No

(project)

    comment = smbuser's home
    path = /share
    read only = No
    write list = @users

Client mount
[root@test2 ~]# mount -t cifs //2.2.1.2/user1/mnt-o username=user1,password=4321
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Check found an error setting for the server:
Solution: Change directory = 0755 in the home directory to Directory Mode = 0755
[homes]

    comment = Home Directories
    browseable = no
    writable = yes
    create mode = 0664
    directory **mode** = 0755

Testparm didn’t detect a problem, so it took a long time. The key is carefulness, carefulness!

Navicat remote connection SQL Server 2014 express report 08001 error

Scenario: Navicat remote connection SQL Server 2014 express reports 08001 error, and it is verified that the firewall port 14341433 has been opened

Process: 1. At first, I think it’s a problem with the connection name. I use IP address or host name to connect, and then change to IP address / instance naming mode, which is better

2. After changing the connection string, the error 08001 is still reported. Try to close the firewall, and the connection is successful, indicating that the problem is on the port

3. Use the netstat – ano command to check, and find that this command is too weak. Find tools on the Internet, and find currports tool, which is very good. Send a screenshot. The software can clearly see all kinds of connection information, especially the remote IP, which is convenient to view the port needed for remote connection when the firewall is closed.

4. It is found that Navicat needs to use port 9061 to open in the firewall, and the remote connection is successful.

Reproduced in: https://www.cnblogs.com/zhengcong/p/4417916.html

E: unable to locate package MySQL server error solution

In Ubuntu system, using the apt-get install command to install the program, the following problems occurred.

root@1:~# sudo apt-get install mysql-server -y
sudo: unable to resolve host iZm5ej8y1b74lo14r36fvlZ
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mysql-server

Solutions:
Sudo apt-get update sudo apt-get update
The software source is not updated, or the software source is modified,

sudo apt-get update

Second method: need to change the software source
Refer to the method of replacing the software source:

http://www.chenxm.cc/post/445.html

E: Unable to locate package mysql-server: Unable to locate package mysql-server: Unable to locate package mysql-server

Can’t open file: (errno: 24)

New structures, the database, the application after connecting up, with the following process:
120528 10:07:32 [ERROR]/usr/local/mysql/bin/mysqld: Can ‘t open file:./ag4_1/raa4_1 FRM’ (24) errno:
I didn’t look at the error code carefully at first! Thought the file was corrupted, reimport! Throw the above error again!
Use the perl error tool to see specific errors!
Linux:/usr/local/mysql/bin #./perror 24
OS error code 24: Too many open files
beyond the maximum number of open file limit! The maximum number of open files on the system is 65535. It cannot be exceeded! The maximum number of open files in the database must be out of limit!
Show variables like ‘open_files_limit’; show variables like ‘open_files_limit’;
>

Reproduced in: https://blog.51cto.com/imysqldba/883374

JSON data format net.sf.json .JSONException: A JSONObject text must begin with ‘{‘ at character 1 of Error:(f…

The substring (3) the use of the http://www.w3school.com.cn/jsref/jsref_substring.asp

Possibility 1: if sb is the data to be converted, let’s say sb is a String

 


The char
The STR [] = sb. ToString (). ToCharArray ();


for
(
The int
i=
0
; i< str.length; i++){


System.out.println(str[i]);


}

After can get into an array of form, check the array before any Spaces, such as if useful
sb.toString().trim().substring(
1
); Cut off


The String json = sb. ToString (). The trim (). The substring (
1
);


The // String json = "{\" success \ ": true, \" MSG \ ": \ \" successful "} ";


System.out.println(json);


System.out.println(json.length());


The JSONObject JSONObject = JSONObject. FromObject (json. The trim ());


System.out.println(jsonobject);



The

"Result" : [{}] ------ left less {

Possibility 2: No initialization, no initBmob () is likely to report this wrong Unregistered

Possibility 3: There is an extra space before the data in the database

 

Reproduced in: https://www.cnblogs.com/wth21-1314/p/7381575.html

[Jackson exception] com.fasterxml.jackson . databind.JsonMappingException Exception handling method

In the project, the parent layer is Car.java [Vehicle Entity] and the child layer is CarCommonParam.java [Vehicle Basic Entity], which is the basic information of a vehicle to multiple vehicles
But at the time of query library collection is a entity error: 【 com. Fasterxml. Jackson. Databind. JsonMappingException 】

com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: cn.skyable.zulin.common.bean.CarCommonParam_$$_jvst95e_39["handler"])
X-Zc-Ack-->null
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:59)
	at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:26)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:541)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:644)
	at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
	at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:1837)
	at com.fasterxml.jackson.core.base.GeneratorBase.writeObject(GeneratorBase.java:261)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshalArray(ACObjectMarshaller.java:53)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshalObject(ACObjectMarshaller.java:37)
	at com.ablecloud.cloudservice.ACObjectMarshaller.marshal(ACObjectMarshaller.java:22)
	at com.ablecloud.common.ACObject.toString(ACObject.java:415)
	at java.lang.String.valueOf(String.java:2994)
	at java.lang.StringBuilder.append(StringBuilder.java:131)
	at cn.skyable.zulin.BaseTest.dealResp(BaseTest.java:88)
	at cn.skyable.zulin.logistics.TestLogistics.TestlistCarsByLogId(TestLogistics.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)

Error description: A truncation is made in the entity where the child layer can look up information about the parent layer, but the parent layer cannot look up information about the child layer due to circular reference problem.
Solution:
Add to the parent car.java
Instead of

Just !!!!

Invalid username / password; login denied

The following error message was sent when connecting to the database

16:10:47.547 [Druid-ConnectionPool-Create-574835454] ERROR c.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:oracle:thin:@192.168.1.2:1521:orcl, errorCode 1017, state 72000
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:675) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:448) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:383) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:776) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:432) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) ~[ojdbc-6.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528) ~[ojdbc-6.jar:11.2.0.3.0]
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:149) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:143) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:786) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:143) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:143) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1515) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578) ~[druid-1.1.9.jar:1.1.9]
    at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2466) ~[druid-1.1.9.jar:1.1.9]

The solution is as follows:
${username}code>${username}
${username}
${username} ${username} ${username} ${username} Or you can use the following system-properties-modeoperty when referring to the configuration file

<context:property-placeholder location="classpath:jdbc.properties" system-properties-mode="FALLBACK" />

Solution of invalid username / password; login denied error in Oracle Database Foundation

A invalid username/password; CMD must be run as administrator in win7 or win8

1. Enter command under DOS:
SQLPLUS SYS/Password set at installation as SYSDBA
(enter)

2. Then type the command:
alter user scott account unlock;
 

When you enter, the words “User has changed” will appear, and you can move on to the next step.  

3. Enter the command:
conn scott/tiger
 

After entering, an error message (as follows) will appear:

ERROR:
ORA-28001: The password has expired
 

Change Scott’s password

New password:

4. Enter a new password;  

5. Repeat the new password.  

Finally, there you go!

Reproduced in: https://www.cnblogs.com/dfyg-xiaoxiao/p/7213772.html