### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at end of input
The error is caused by empty userIds
### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at end of input
The error is caused by empty userIds
1.Redis Startup Error: Reading the configuration file, at line 194>>> ‘always-show-logo yes’Bad directive or wrong number of arguments
Error Messages:
[root@xxx-0001 src]# redis-server /etc/redis-cluster/redis-7001.conf
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 194
>>> 'always-show-logo yes'
Bad directive or wrong number of arguments
Cause analysis:
Error means that the specified configuration file directory is wrong or the number of parameters in the configuration file is wrong
the reason is that redis-4.0 is installed for the first time At 8:00, the environment variable is written. When redis server is executed, it will first query whether this instruction is configured in the environment variable,
it is found that there is (or the old 4.0.8) However, the configuration file used is 5.0 To sum up, the redis server in the environment variable is imported from my previous version. If I change the version of redis, I can’t use the previously imported environment variable to execute
Solution:
From this point of view, the solution is clear:
method 1: re import the redis server of the new version of redis to the environment variable
method 2: directly use the redis server in the new version of redis to execute the startup command
Finally, let’s see the situation after the solution
[root@xxx-0001 src]# ./redis-server /etc/redis-cluster/redis-7001.conf
27895:C 06 Dec 2021 13:09:29.818 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27895:C 06 Dec 2021 13:09:29.818 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27895, just started
27895:C 06 Dec 2021 13:09:29.818 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7002.conf
27952:C 06 Dec 2021 13:09:37.218 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27952:C 06 Dec 2021 13:09:37.218 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27952, just started
27952:C 06 Dec 2021 13:09:37.218 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7003.conf
27996:C 06 Dec 2021 13:09:40.829 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27996:C 06 Dec 2021 13:09:40.829 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27996, just started
27996:C 06 Dec 2021 13:09:40.829 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7004.conf
28021:C 06 Dec 2021 13:09:43.651 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28021:C 06 Dec 2021 13:09:43.651 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28021, just started
28021:C 06 Dec 2021 13:09:43.651 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7005.conf
28065:C 06 Dec 2021 13:09:46.736 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28065:C 06 Dec 2021 13:09:46.737 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28065, just started
28065:C 06 Dec 2021 13:09:46.737 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7006.conf
28124:C 06 Dec 2021 13:09:50.963 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28124:C 06 Dec 2021 13:09:50.963 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28124, just started
28124:C 06 Dec 2021 13:09:50.963 # Configuration loaded
[root@xxx-0001 src]# ps -ef|grep redis
root 6227 1 0 12:35 ? 00:00:04 redis-server 0.0.0.0:6379
root 27896 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7001 [cluster]
root 27953 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7002 [cluster]
root 27998 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7003 [cluster]
root 28022 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7004 [cluster]
root 28066 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7005 [cluster]
root 28125 1 0 13:09 ? 00:00:00 ./redis-server 0.0.0.0:7006 [cluster]
root 28276 4581 0 13:10 pts/4 00:00:00 grep --color=auto redis
When redis executes redis cli shutdown, it reports error err errors trying to shutdown Check logs.
1. Start the pseudo cluster after installing reids (the configuration file is in/data/server/redis/etc/redis.CONF)
redis-server /data/server/redis/etc/redis.conf
redis-server /data/server/redis/etc/redis.conf --port 6380
redis-server /data/server/redis/etc/redis.conf --port 6381
redis-server /data/server/redis/etc/redis.conf --port 6382
Generate multiple redis nodes
2 Suddenly want to delete the redundant nodes
redis-cli -p 6380 shutdown
Error reporting:
3 Solve the problem of
modifying the redis configuration file
vim /data/server/redis/etc/redis.conf
# Modify
logfile "/data/server/redis/log/redis.log"
Kill the redis process and restart it.
Redis cli shutdown can be used
Error reporting for startup project:
error querying database Cause: java. sql. Sqlsyntaxerrorexception: expression #2 of select list is no…
solution:
Enter MySQL with CMD root account
execute commands in MySQL
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Or use other connection tools to connect (root permission is required);
My backend Shijian type is string, the SQL server time type is datetime,
the time format to be returned is “2021-12-09 12:20:45”
#{} just add a JDBC type = varchar
Case 1:
In versions before MySQL 8, the encryption rule is mysql_native_Password, and after MySQL 8, the encryption rule is caching_sha2_password。 There are two ways to solve the problem. The first is to upgrade the graphical interface tool version, and the second is to restore the MySQL user login password encryption rules to MySQL_native_password.
the second solution is as follows. After logging into MySQL database with the command line, execute the following command to modify the user password encryption rules and update the user password. Here, modify the user name as“ root@localhost ”The user password rule of is “mysql_native_password”, and the password value is “OK”, as shown in the figure.
//Using mysql database
USE mysql;
//change the password rule and password for the 'root'@'localhost' user
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ok';
//refresh permissions
FLUSH PRIVILEGES;
Situation II
The virtual machine MySQL is connected, and you need to perform the authorization operation
authorize the root user:
grant all on. To ‘root’ @ ‘%’ identified by ‘use password’
flush privileges;
When accessing Oracle with SYSDBA, the following information is prompted:
[oracle@localhost ~]$ sqlplus/as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 2 20:21:40 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
solve:
First, make sure to start listening:
[oracle@localhost ~]$ lsnrctl start
Then start instance:
SQL> startup;
This is the open status when you view the database instance again:
SQL> select status from v$instance;
STATUS
------------------------
OPEN
1. Error:
An error is reported when opening the database through phpstudy;
2. This error is due to the MySQL version problem
3. Solution
(1) Close the error box and view the SQL used by the current database_ mode:
Enter select in the SQL editor @@ sql_Mode operation
(2) Modify the MySQL configuration file. The configuration file under windows is my.ini. Find out SQL_Mode, copy this value, and add a configuration item in my.in (delete the option only_full_group_by for the queried value, and copy everything else)
In my.in file, Modify SQL after [mysqld]_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_ DATE,ERROR_ FOR_ DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
If the row is not added directly
(3) Restart Mysql to take effect
1. Unknown SSL protocol error in connection to XXX: 443
Unknown SSL protocol error in connection to XXX: 443 occurs when Git is used to download from a remote location..
Method 1:
(example):
Set up proxy server:
: Add in .gitconfig
http.proxy=127.0.0.1:8087
http.sslVerify=false
Method 2:
(example):
Type directly on the command line
git config --global http.proxy 127.0.0.1:8087
git config --global http.sslVerify false
Error creating bean with name ‘accountService’: Unsatisfied dependency expressed through field ‘accountDao’;
Spring integration mybatis error:
Warning: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDao' defined in file [D:\myJava\MyProject\springSSM_day06\target\classes\com\itheima\dao\AccountDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [bean.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDao' defined in file [D:\myJava\MyProject\springSSM_day06\target\classes\com\itheima\dao\AccountDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [bean.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
Error code location: value = datasource
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="${jdbc.driver}"></property>
<property name="url" value="${jdbc.url}"></property>
<property name="username" value="${jdbc.username}"></property>
<property name="password" value="${jdbc.password}"></property>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" value="dataSource"></property>
<property name="typeAliasesPackage" value="com.itheima.domain"></property>
</bean>
Reason: because we use the factory to create Dao objects, we need to get connections from the data connection pool objects, so we can’t use value binding
value for binding strings
ref for binding objects
The correct is as follows: use ref to get the object
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="typeAliasesPackage" value="com.itheima.domain"></property>
</bean>
Memcached installs version 1.4.5
the administrator runs CMD with the following error:
Solution:
on the command line, enter schtasks/create/SC OnStart/TN memcached/TR "'c:\memcached\memcached. Exe '- M 512"
, enter
note: C:\memcached\memcached.exe replace your installation address, Please refer to memcached installation for more installation details
See below:
Question:
Enter query statement Load CSV with headers from“ file:///hudong_pedia.csv "As line
error reported:
the reason is that the statement is not complete. Load CSV should be used in combination with create or merge
for example:
LOAD CSV WITH HEADERS FROM "file:///C:/dir/file.csv" AS row
CREATE (n:Label {attributeName: row.columName});
Reference link: link