ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061) ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
> > Services.msc (open service) –>; Find MySQL in the services list –>; Right-click MySQL and click Start
However, sometimes you have installed MySQL, but there is no MySQL in the service list. What can you do?
(1) Open CMD (run C:\Windows\System32\cmd.exe as an administrator),
(2) Use CD to change the directory to bin directory of MySQL Server 5.6;
C:\Program Files\MySQL\MySQL Server 5.6\bin> mysqld.exe -install
(4) When there is Service successfully installed, it means that MySQL Service successfully installed.
At this point, the MySQL service is already present in the computer service.
Matters needing attention
The CMD command opens and runs under the bin directory where MySQL is installed:
> > > Mysqld –install (“mysqld”, not “mysql”)
Install/Remove of the Service Denied Install/Remove of the Service Denied
open CMD and run it as an administrator. When: Service successfully installed. Indicates that the service is installed successfully.
In this paper, the scene
When writing HTML using VS Code, the imported JS file needs to import modules across domains.
why
Use File protocol, need to use HTTP, Data, Chrome-Extension, Edge, HTTPS and other protocols, commonly speaking is the need to use the server to open a port.
The solution
Right click directly in VS Code and select Open with Live Server.
Download kafka website: http://kafka.apache.org/ enter the url: http://kafka.apache.org/downloads
System environment 1, the operating system: 64 CentOS7 2, JDK version: 1.8.0 comes with _271 version 3, they are: they are – 3.4.6 4, three server deployment success: 192.168.192.150; 192.168.192.152; 192.168.192.155;
Pre-setting:
192.168.93.155 nod> br> If you change the hosts in Windows 10, you can copy this file to the desktop and add the above contents. Then replace the hosts file under C:\Windows\System32\ Drivers \etc with .
props. Put (consumerConfig. Bootstrap_servers_config,”node1:9092,node2:9092″); tar-zxvf /usr/local/soft/kafka_2.11-2.2.0.tgz -c /usr/local/ kafka tar-zxvf /usr/local/soft/kafka_2.11-2.2.0.tgz -c /usr/local/
2, configuration, kafka [root @ localhost] # vi/usr/local/kafka_2. 11-2.2.0/config/server properties
Kafka’s configuration information is configured in server.properties
Find the following two lines of code and comment them separately
#broker.id=0 #zookeeper.connect=localhost:2181
Modify the directory where the logs are stored
The log. The dirs =/kafka_2. 11-2.2.0/kafka – logs
Add the following three configurations at the bottom of the file:
Broker. Id = 1 zookeeper. Connect = 192.168.192.150:2181192168 192.152:2181192168 192.155:2181
[root@localhost local]# CD kafka2.11-2.2.0 / root@localhost kafka2.11-2.2.0]# mkdir kafka-logs [root@localhost local]# CD kafka2.11-2.2.0 / [root@localhost kafka2.11-2.2.0]# mkdir kafka-logs
Note: If it is a stand-alone version, the default is fine, we do not need to change anything. Now we are configuring the cluster, so we need to configure some parameters
1), Broker. id: Each machine cannot be the same
2), ZooKeeper. Connect: Since I have 3 ZooKeeper servers, I set ZooKeeper. Connect to 3 servers and must add all of them
3), Listeners: Listeners must be set when configuring the cluster, otherwise the leader error will not be found for future operations
WARN [Producer clientId = console – Producer] Error while fetching the metadata with the correlation id 40: {test = LEADER_NOT_AVAILABLE} workClient (org.apache.kafka.clients.Net)
4) Notice that the two servers, ZooKeeper. Connect, are configured the same as here, but the Broker. ID and Listeners cannot be configured the same
5 copies, kafka to two other servers [root @ localhost config] # SCP – r/usr/local/kafka_2. 11-2.2.0 [email protected]:/usr/local/ [root @ localhost config] # SCP – r/usr/local/kafka_2. 11-2.2.0 [email protected]:/usr/local /
You will be asked to enter the password of the target machine. Just follow the instructions and modify the Broker. id and Listeners of the two servers as follows:
6, 192.168.192.152 [root @ localhost] # vi/usr/local/kafka_2. 11-2.2.0/config/server properties
Then a change on the broker. Id = 2 and listeners = PLAINTEXT:// 192.168.192.152:9092, the zookeeper. Connect don’t need to change are the same
Broker. id = 2 zookeeper. Connect = 192.168.192.150:2181192168 192.152:2181192168 192.155:2181 listeners = PLAINTEXT:// node1:9092
7, 192.168.192.155 [root @ localhost] # vi/usr/local/kafka_2. 11-2.2.0/config/server properties
Then a change on the broker. Id = 3 and listeners = PLAINTEXT:// 192.168.192.155:9092, the zookeeper. Connect don’t need to change are the same
Broker. Id = 3 zookeeper. Connect = 192.168.192.150:2181192168 192.152:2181192168 192.155:2181 listeners = PLAINTEXT:// 2:9092
If the firewall has been turned off, it can be ignored. All three machines must be turned on. Kafka communication is conducted through port 9092 by default, which is the Listed Listeners we have provided above
[root@localhost config]# firewall-cmd –zone=public –add-port=9092/tcp –permanent [root@localhost config]# firewall-cmd –reload
[root@localhost /]# /usr/local/ ZooKeeper -3.4.6/bin/ zkserver.sh start [root@localhost /]# /usr/local/ ZooKeeper -3.4.6/bin/ zkserver.sh start [root@localhost /]# /usr/local/ ZooKeeper -3.4.6/bin/ zkserver.sh start
10, start, kafka, three is to launch the [root @ localhost /] #/usr/local/kafka_2. 11-2.2.0/bin/kafka – server – start. Sh – daemon/usr/local/kafka_2. 11-2.2.0/config/server properties
[root@localhost /]# JPS 87 JPS 9>kafka 9224 Kafka 9224 Kafka [root@localhost /]# CD /usr/local/kafka_2.11-2.2.0/ root@localhost kafka_2.11-2.2.0]# bin/ kafka-Topics. Sh –create — ZooKeeper 192.168.192.150:2181 –replication-factor 1 –partitions 1 –topic test Created topic test.
If successful, it outputs: Created Topic “test”.
13, see the topic while 192.168.192.150 created on the topic, but the other two machine also can see that the 192.168.192.152 client
[root@localhost /]# CD /usr/local/kafka_2.11-2.2.0/ [root@localhost kafka_2.11-2.2.0]# bin/ kafka-Topics — List — ZooKeeper 192.168.192.152:2181 st
Note: The IP here can be 192.168.192.150, 192.168.192.152, 192.168.192.155. Themes can be seen on any of the three servers
root@localhost kafka_2.11-2.2.0]# bin/kafka-console-producer.sh –broker — list 192.168.192.150:9092 –topic test >> a > b > c
# bin/kafka-console-consumer.sh –bootstrap-server 192.168.192.152:9092 — Topic test –from — Beginning a
E:\kafka\kafka_2.12-2.3.0 en run .\> \ Windows \kafka-server-start.bat.\config\server.properties
CMD : \kafka\kafka_2.12-2.3.0 <>> kafka-t>s. Bat –create –zookeeper localhost:2181 –replication-factor 1 –partitions 1-topic test
Producer run CMD, enter kafka bin\ Windows folder : \kafka\kafka_2.12-2.3.0\bin\ Windows t>run kafka-c>le-producer.bat — broke-list localhost:9092 –topic test
E:\kafka\kafka_2.12-2.3.0\bin\ Windows en run k>-console-consumer.bat –bootstrap-server localhost:9092 –topic test –from — beginning
I am a dual system installed with UEFI+GPT. Computer: Lenovo R720 System: Windows10 +Ubuntu16.04
After installing Ubuntu16.04, Win10 from the GRUB menu was somehow missing. (If you don’t even have GRUB on display, click on Windows 10 to install Ubuntu.)
Goal: Access Win10 from Ubuntu GRUB.
Implementation:
The terminal executes the following commands in turn
The terminal continues to execute sudo update-grub
The file /boot/grub/grub.cfg has been changed.
After rebooting, the Win10 option appears in the GRUB menu.
More:
If need to modify the order of the grub or modify grub background: this is grub Customizer installation method: https://www.tuziang.com/combat/635.html
ICloud Drive is a very useful feature that makes it easy to share files and documents between your devices (including other Macs, iPhones, and iPads) by automatically synchronizing and copying files between devices, so you should only disable iCloud Drive if you don’t have it enabled. So how to disable the iCloud drive on the Mac, there is a need for friends to welcome the reference!
Please note that this is disabling iCloud Drive completely on the Mac, not just disabling the iCloud desktop and documents that only store these two directories in iCloud. Before attempting this step, make sure your Mac has a valid Internet connection.
The specific methods are as follows
1. Go to the Apple icon in the menu bar and select “System Preferences”. 2. Select “iCloud Settings”. 3. Uncheck the iCloud drive next to this check box.
4. Make sure to disable the iCloud drive and remove the iCloud files from your Mac.
You now have two options to choose what you want to do with your iCloud file. Keep a copy – This keeps a downloaded copy of the iCloud files on the Mac. This option is recommended if you want to access the files offline later. This option works for most Mac users. Delete from Mac – Selecting this option will remove all files from the iCloud drive on your Mac, and you will no longer be able to access these files on your computer.
5. Once you have selected the desired options, exit System Preferences on your Mac.
When you close the iCloud drive on your Mac, you’ll notice that the iCloud options disappear from the sidebar of the Finder, as well as from the Dock or anywhere else on your system. This is because you have completely disabled iCloud Drive from your Mac. You will not be able to save, copy, move, or upload files from your Mac on your iCloud drive. To re-enable iCloud Drive, go back to System Preferences and select the iCloud Drive box.
C/CPP is all right, but you need to create a new project first. You can only have one main at a time, so you need to be able to let it compile and execute a single file
Installing a plug-in in the Settings to find the plug-in installation, after the completion of the open folder, you first create a new Cmakelist files, and right click on the need to perform the c file choose the bottom of the add, you will see the main function on the left side of a small arrow, direct execution
If by the United States Center for Domain name US Domain Center: http://www.usdomaincenter.com/ Installatron installed in the Linux host account application, you can use Installatron backup these applications. You can then use these backups to restore your application to its previous state.
Required: Installatron does not automatically create a backup file for your application – you must have created the backup file manually and then follow these steps.
Go to the US Domain Center product page. Under Web Hosting, select Manage next to the Linux Hosting account you want to use. In the Accounts Dashboard (control panel), select CPanel Admin (CPanel Administrator). On the cPanel home page, select Web Applications, and then under My Applications, select the Web application that you want to restore (for example, WordPress in the screenshot below). On the installed page, in the top right corner, click My Backup. Next to the backup you want to use, click the icon below Restore to the original location, and click Continue. Click Restore.
References and materials:
“Uboot sf command usage” kickxxx
When running the development board, it prompts the following alarm:
cp: can't stat '/progs/rec/*': No such file or directory
/dev/mtdblock5
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xdde4 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x9a31 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x2648 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0xb317 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0xe2ae instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x36f7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0xe9f5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000002c: 0xecb9 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0xc0b5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000034: 0x5339 instead
jffs2: Further such events for this erase block will not be printed
………… ………… …………
………… ………… …………
………… ………… …………
jffs2: Empty flash at 0x00072000 ends at 0x00072010
jffs2: Empty flash at 0x00074000 ends at 0x00074004
jffs2: Empty flash at 0x00074008 ends at 0x00074010
jffs2: Empty flash at 0x00076000 ends at 0x00076010
jffs2: Empty flash at 0x00078000 ends at 0x0007800c
jffs2: Empty flash at 0x0007a000 ends at 0x0007a010
jffs2: Empty flash at 0x0007c000 ends at 0x0007c010
jffs2: Empty flash at 0x0007e000 ends at 0x0007e010
jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 8
mount: mounting /dev/mtdblock5 on /etc/conf.d/ failed: Input/output error
/home/bashrc.sh: line 38: can't create /proc/sys/vm/extra_free_kbytes: nonexistent directory
probe 0x0; SF probe 0x0; sf erase 0x780000 0x800000
SF read erase read erase SF read erase SF read erase SF read>se SF read erase>r> SF write erase SF read erase SF read erase SF read erase SF read erase SF write
command th>
explain th>
use example th>
meaning th> tr>
sf, the probe [[bus:] cs] [hz] [mode] td>
init flash device on given SPI bus and chip Select td>
td>
td> tr>
td>
td>
td>
td> tr>
sf, read addr offset len td>
read 'len bytes starting at "offset" to the memory at "addr" td>
sf, read 0x82000000 0x10000 0x20000
ash offset 0x10000(64KB), length 0x20000(128KB), 0x82000000 Offset and length minimum unit operation is Byte td> tr>
td>
td>
td>
td> tr>
sf, write addr offset len td>
write 'len bytes from memor at' addr to flash at "offset" td>
0 x82000000 sf, write 0x0 0x20000 TD>
8200 0000 bytes, 0x0 bytes, 0x20000 bytes, 0x0 bytes, 0x0 bytes, 0x0 bytes, 0x0 bytes Offset and length minimum unit operation is Byte td> tr>
td>
td>
td>
td> tr>
sf, erase offset [+] len td>
erase 'len bytes from' offset '+' len 'round up' len 'to block size td>
sf, erase 0 x0 0x10000
ase block at offset 0x0 to 0x10000 Erase block at offset 0x0 Offset and len parameters must be erase block aligned td> tr>
td>
td>
td>
td> tr>
sf, update addr offset len td>
erase and write 'len bytes from the memory at "addr" to flash the at "Offset" td>
td>
td> tr> tbody> table>
From the SF command, we can see several points:
p>
Support Byte level read and write operation, support random access.
How to verify the effect of reading and writing command can combine uboot md, sf, read, sf, write involves memory operations, can use the md for memory data md x82000000 0 0 x100 0 x82000000 printing, 256 bytes of memory length range data If the reference quotes your creation, and the reference, data does not sign your name, please do contact me to add, bring trouble to you!
failed to initialize NVML driver/library version mismatchfailed to initiate NVML driver/library version mismatch. failed to initiate NVML driver/library version mismatch
This situation is generally Nvidia’s driver is automatically updated, enter the command to view the log, it is automatically updated
Referring to StackFlow, it was decided to restart the server, which was resolved after the restart.
I have to say that this driver update is really annoying. Anyone who reads this blog and knows how to disable this driver update on Ubuntu, please leave a comment in the comments section (for the time being, only on Windows)
Due to the ARM architecture, there are still a considerable number of Mac software not upgraded ARM architecture support can not run on the Mac computer with M1 chip. When opened on the computer with M1 chip, it may prompt [” XXX “cannot be opened because of a problem. Please contact the developer…]
However, most applications are compatible with the M1 chip, as follows:
1. Open Access, enter the application directory, find the software icon, right click on the icon and select “Show Profile”, or select the icon and press the shortcut key “Command + I” to open the profile;
2. Check “Open with Rosetta” and then open the software and run it.
About Rosetta
Rosetta 2 runs in the background every time you use an App built specifically for Macs equipped with Intel processors. Rosetta will automatically convert the App to work with the Apple chip.
In most cases, apps that require Rosetta will not show any difference in performance.
What software can be run through Rosetta?
To see if the application supports Rosetta, look at the type of “Type” on the profile:
The application (generic) means that the App supports both Apple chips and Intel processors and uses Apple chips by default.
The application (Intel) says that the App only supports Intel processors and requires Rosetta to run on any Mac with Apple’s chip.
Nmap lists open ports for remote machines
Nmap Scan Technology View Zenamp Scan Port NAMP Scan Port from the command line
Domain name resolution using the specified DNS server Target host alive or firewall enabled (-pn parameter) Scan specific port range (-p)
Nmap profile
Nmap (Network Mapper) is used to discover hosts and services on a computer network to create a “map” of the network. To achieve its goal, Nmap sends a specific packet to the target host and then analyzes the response. We can use Nmap to detect the server’s live and developed services, as well as to perform security audits on targets. zenamp: Graphical interface version of Namp.
The principle of
Determine whether the command line entered by Nmap contains the domain name. If it contains the domain name, it needs to use the DNS server for domain name resolution, and then send ICMP Echo Request to detect the host’s existence. Nmap will retrieve the machine information including the port information based on the packet returned.
Port state
STATE (port) th>
explain th> tr>
open td>
said port in the open STATE td> tr>
closed td>
said port closed td> tr>
filterd td>
said port in the filter can’t receive the returned the probe STATE td> tr>
unfilterd td>
said port received back to the probe, but can’t confirm td> tr>
opend/unfilterd td>
said port in the open or no filtering state td> tr>
closed/unfilterd td>
said port in the closed or filtering state td> tr> tbody> table>
NMAP scan technology to view
nmap-h / mark> > SCAN TECHNIQUES are part of the SCAN TECHNIQUES. The following scanning techniques can be used to bypass certain filters in certain scenarios to achieve the purpose of detection. The parameters should be selected according to the actual situation.
Zenamp scans ports
Once Zenamp is open, enter the domain name or IP you want to probe into the target.
The namp scan port on the command line
Kali bring namp, nmap to use under Windows, the installation is successful in his folder exists after zenamp namp command line version exists, in the folder of CMD into namp enter namp. Exe followed by the domain name or IP address mark> can scan, need to know the process of scanning can use the enter key when can get the current scanning progress.
Use the specified DNS server to resolve the domain name
The domain name is resolved to the IP address by the DNS server before the NMap probe. We can also use the specified DNS server for the resolution.
Nmap — DNS-Sever DNS server IP address to probe the domain name
8.8.8 is the Google domain name server. when detecting some specific domain, because inside the company set up the DNS server, and resolve the IP address to the site, there might be Google’s DNS server does not contain the domain name and lead to can’t parse, where you need to change the DNS server to resolve the domain name mark>
Target host alive or firewall enabled (-pn parameter)
When we already know that the host is alive or that the firewall is enabled, we can use the -pn parameter to stop probing previous ICMP requests. The purpose of not triggering firewall security mechanism has been reached.
Scan specific port range (-P)
-p m-n can be used to specify all ports in the port range between m and n.