Tag Archives: note

Navicat for MySQL error 1251 failed to connect to MySQL

It’s very useful to have a try, so make a record of it https://blog.csdn.net/wshxhghsjjsn/article/details/80459542


As like as two peas, I wrote the previous revision, but my MySQL version was 8. The current version is 5.7. So the screenshots are weird, but the steps are the same. I have tried all the 2 versions.

Step one: open as like as two peas, Command Line Client, see CMD, mysql, and you will find 2 identical ones.

Step 2: enter the password of MySQL. Enter is the password set when installing mysql. Only enter the password without semicolon

Step 3: enter alter user ‘root’ @’localhost ‘identified with MySQL_ native_ Password by ‘MySQL password’; Don’t miss the carriage return. There is a semicolon at the back. The password of MySQL is set when installing mysql

Step 4: input flush priorities; Don’t miss the semicolon at the back of the carriage return

Let me demonstrate: my MySQL password is 111111

The word “OK” won’t make a mistake

You can also modify the MySQL password through this method. For example, my MySQL password is 111111, I want to change it to 123456

That is to change the password of Mysql to 123456

Because vcruntime140 was not found_ 1.dll, unable to continue code execution

Problem Description:

Error in installing MySQL: due to unable to find vcruntime140_ 1.dll, unable to continue code execution

resolvent:

This is the lack of dynamic link library (. DDL file), which has nothing to do with MySQL. You can download this DDL file
and decompress it to vcruntime140_ 1. DLL can be copied to C:// Windows/system32
note that the 32-bit version of vcruntime140_ 1. DLL needs to be copied to C:: (Windows) syswow64

The solution to reload and rollback of VMware after unloading

VMware reload is a rollback because win10 is not an enterprise version, some of the registry of VM can not be recognized, and some plug-ins are associated with other versions of win, which makes VM unable to be completely deleted. At this time, go to install win10 as enterprise version, and then re install VMware, this situation will not appear in the future. Remember, do not run immediately after installation, shut down and restart, do not install in C disk.

Error report of covertotraditional conversion from simplified to traditional

Following the online teacher’s learning, I typed a simplified traditional Chinese conversion code as follows:
found the seventh line of code error, and moved the mouse to the code. The method covertotraditional (string) is undefined for the type zhconverterutil. In fact, it’s a jar package error. The zhconverterutil class in the jar package has no coverttotraditional method

we just need to change coverttotraditional to totraditional to complete the conversion from simplified to traditional Chinese

summary: if you report any error in this aspect in the future, you can go to the jar package to see if there is such a method.

STM32 added firmware library, but could not find h file

STM32 added firmware library, but could not find h file

For example, I often use other projects, and sometimes when I add a function to it, I may encounter this situation
. …\SYSTEM\adc\adc.c(12): error: #20: identifier “ADC_ InitTypeDef”
is undefined ADC_ InitTypeDef ADC_ InitStructure;
that’s because although we have added a firmware library, but in stm32f10x_ Conf.h is annotated
after is annotated, the H file can’t be compiled. You just need to cancel the annotation to compile it.

How to Solve Tomcat Error: Could not resolve view with name ‘xxx/xxxxxxx‘ in servlet with

Click the control to not receive the returned JSON object, Tomcat reports an error.

reason:

Because the return information is a JSON object, the annotation added to the entry class where the controller method is located is: @ controller

The @controller is not suitable for returning JSON content

Method 1: change the @ controller annotation to @restcontroller without affecting the use of other methods

Method 2: add @ ResponseBody annotation to the method that needs to request to return the JSON object

Some of the other methods in the class of this method in the project return to the specified page, so @restcontroller cannot be used to replace @ controller directly, so method 2 is adopted to solve the problem.

The difference between @controller and @restcontroller is as follows

@Restcontroller is a stereotype annotation that combines @ ResponseBody and @ controller.
it means:
@restcontroller annotation is equivalent to the combined function of @ ResponseBody + @controller.

1) If you only use @restcontroller to annotate the controller, the methods in the controller cannot return the JSP page, the configured view parser internalresourceviewresolver does not work, and the returned content is the content in return.

For example, if you should go to the success.jsp page, success.jsp will be displayed

2) If you need to return to the specified page, you need to use @ controller with the view parser internalresourceviewresolver
3) if you need to return JSON, XML or custom media type content to the page, you need to add @ ResponseBody annotation to the corresponding method

Import any QT binding error during installation of evo

Installation Evo appears error:Failed to import any qt binding

We need to evaluate the trajectory accuracy of UAV. We can refer to the process given in GitHub for installation by using Evo tool. I chose to install it from the source file. During the test, there was error error:Failed to Import any QT binding error. This is caused by the installation of Matplotlib Library in different versions of Python. Because I want to use ROS, ROS was initially installed in the environment of python2. Here, continue to install this library in python2. First, uninstall Matplotlib and then install it again.

pip uninstall matplotlib
pip install matplotlib

After the installation is completed, the test now, there will be errors in the title, you need to run this command again in the source folder to install again.

pip install --editable . --upgrade --no-binary evo

Fatal error in CentOS: Python. H: no that file or directory

Today, when I installed the software on my virtual machine, this error occurred. After searching the Internet, I found that I wanted to install Python devel, but I found that I couldn’t solve the problem after installing according to the online command, and then I found that there was another Python 3 devel, that is, I need to install the corresponding devel according to your current version of Python in Linux, I use python3, so the corresponding installation command is:
sudo Yum install python3 devel
if it is python2, the corresponding installation command is
sudo Yum install python3 devel

Failed to dlsym make_device: undefined symbol: make_device

Failed to dlsym make_ device: undefined symbol: make_ device

Recently, I encountered some bugs when doing development. I have been troubled for a long time. Although I am a good cook, I think I can accumulate it. When I encounter the same type of problems in the future, I have a way to solve the problems. The problem is as follows: Android recovery system can do some basic test demo below. But this latest demo is developed by C + + and C language. Some functions need to rely on dynamic libraries, such as librecovery_ UI. So, but there is a special library called librecovery_ ui.recovery.so。 At that time, using the find command, we could find the generation location of the library. However, when using grep to find the generation location of the dynamic library, we couldn’t find it. We only found the calling location. For a time, we doubted whether we had made a mistake. Finally, we searched under the general system root directory. Finally, we kept printing a lot of messy code under the out subdirectory, thinking it was a program crash, It’s time for ^ C to end the process. But in the end, no matter how many, just let it collapse. Finally, we found the location of the Library under the out directory. It turned out that it was an automatically generated MK file, in which many concise generation dependent library scripts were used. Finally, we found the location of the so.

Then I met the problem on the topic, that is, how can the so library compiled according to the correct android.mk script file not find the defined library when using dlopen call?I wonder if there is a problem with the function, and then I wrote a new function to test the call, and found it still can’t work, Failed to dlsym FN: undefined symbol: test is also displayed. Then I searched the Internet and found that most people said that they needed to add extern “C” to the function. Finally, according to what I said on the Internet, I found that it was still not possible. Finally, I asked my colleagues and got the answer to the question, which is to use the nm command of Linux to find the dynamic library or the static library that contains the functions that can be called. Finally, I found that the dynamic library that I passed to the board did not have the make that I wanted to call_ Then use the find command to find two. So libraries with the same name. Finally, find the function body to be called in another library. Finally, transfer another. So library to the board. Finally, it is successful.

Solve the problem of 404 Not Found error in nginx accessing dynamic interface

Problem description

We design a set of recruitment back transfer system, and use ant design Vue and jfinal framework at the front and back end respectively. You want to deploy the project to the server, but external access always reports 404 not found

Solutions

The error is: the dynamic interface can not be found, but I don’t know whether there is a problem in the project or after nginx agent.
Therefore, it is necessary to test the interface of the project itself and the interface after nginx proxy.

First, test the interface in the project

Enter the command: curl on the Ubuntu side http://localhost :port/xxx/xxx

Here my interface is. curl http://localhost:20294/sys/login

Results of operation:

It shows that there is no problem with the interface in my project.

Test the interface after nginx proxy again

Then input the command in Ubuntu

curl http://localhost:8080/api/user/login

Running result:

the prompt here is that the interface cannot be found, which indicates that the problem lies in the proxy server nginx, so we need to modify the configuration file of nginx.

According to the suggestions of other blogs, I added a slash to this place in nginx configuration

after restarting the server, it still can’t work.

Complete solution

When I didn’t know what to do, I suddenly found that there were two nginx in my server ····
I was wondering if it was because there were two nginx, and the modified configuration file was not the nginx I started. So I replaced all nginx configuration files with my original configuration files, and then restarted. Still not

Worried about the two nginxs, I deleted all nginxs in the server. Delete steps (run the following steps in turn:

ps aux|grep nginx  #View nginx processes
kill -9 process number #Kill the nginx queried in the previous step (process number is in the second column)
find/-name nginx #Find the nginx file address
rm -rf xxx #Delete all nginx files

Finally, use weget to install the new nginx, and then install it according to the original installation steps. After modifying the configuration file, run curl to access the dynamic interface. All of a sudden, it’s OK!

The following is my nginx configuration file:

user root;
#user  nobody;
worker_processes  4;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    underscores_in_headers on;
    large_client_header_buffers 4 32k;
    client_max_body_size 50m;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nopush          on;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout    300;
    fastcgi_read_timeout    300;
    fastcgi_buffer_size     64k;
    fastcgi_buffers     4   64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 256k;
    tcp_nodelay         on;

    #gzip  on;


    ######################################################
    #############     Sparrow configuration address    ###########
    ######################################################
    server {
        listen       8080;
        server_name  somename;

        location /api/ {
            proxy_pass http://0.0.0.0:20294/; #Mapping to the local port.
            proxy_redirect off;
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 200m;
            proxy_connect_timeout 600;
            proxy_read_timeout 600;
        }
        
        location/{
            root /root/project-template/config/static;
            try_files $uri $uri/ @router;
            index index.html;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 200m;
            proxy_connect_timeout 600;
            proxy_read_timeout 600;
        }

        location @router {
            rewrite ^.*$ /index.html last;
        }
    }
}

note: when configuring the dynamic access API, remember to add a slash at the end

So far, the problem has been solved perfectly.