Category Archives: How to Fix

Question: cannot create windows service for mysql.error : 0 (install MySQL)

Question 1: [MySQL]cannot create Windows Service for MySQL. Error :0
Error :0 Error: Cannot create Windows Service Formysql.error :0 error.
Most of the errors were caused by reinstalling mysql or upgrading myDQL using the MySQLConfiguration Wizard.
Solutions:
You can use the Windows SC program to remove the mysql service.
C:> sc delete mysql
[SC] DeleteService SUCCESS
If you reuse the MySQL Configuration Wizard, you will not have this error.
If that still doesn’t work, just restart the computer
I did so, but a new mistake came up:
Question 2: [MySQL] Could not start the service MySQL
When installing mysql 5.1.33, there was an error in the third item of the Execute Configuration wizard in the Server Instance Configuration wizard to Start Service. The error was suggested to be “Could not Start the Service mysql” (this situation was usually caused by the dirty uninstall of mysql after installing mysql. Uninstall, restart, and reinstall. Take a look at the service. If it fails to uninstall, you can use mysqld-nt-remove).
The specific method is as follows :
check whether there is mysql in the service, if there is, stop the service;
run the add and remove program in the control panel and unload mysql;
after unloading, open the registry, view HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services under the key, if there are related mysql key values (mysql, mysqladmin) then delete it;
restart, remove the mysql installation residual directory (check the service, at this time there is no mysql in the service);
reinstall mysql. Do not run the Server Instance Configuration wizard after installation. Run the wizard from the start menu after restarting.
PS: A method worthy of reference
 
Question 3: What if the control panel does not add or remove programs?
Answer:
, click “Start → Run”, enter “Appwiz.cpl” enter, so that the corresponding module can be started.
. Find the file path “C :\ Windows \ System32 \ AppWiz. CPL” from the installation disk. And then copy and paste
. Re-register
Click “Start → Run” to enter:
regsvr32 mshtml.dll
regsvr32 shdocvw.dll -i
regsvr32 shell32.dll -i
Question 4: How do I use the registry to delete an uninstaller
First, click Start – run – type Regedit – enter the registry – then click HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall- where you can see which Software you’ve installed before!
then click on the software you want to uninstall — you can see the “UninstallString” subkey next to it — double click on the subkey and the edit string dialog will pop up — copy the key inside
and then go back to the desktop — click start — run — paste the key inside — enter ~!
so that you can delete in the add and delete not in the program ~! Of course, if there is no program in it that you want to uninstall ~! So those programs are not registered in the registry, which means you can delete them directly.
 

Python crawler urllib.error.HTTPError : HTTP Error 418:

HTTPError: HTTP error 418:

>

>

>

>

>

>

>

> ‘s disguise code is as follows:
‘s many partners go to user-agent every time they do a crawler project. In fact, it is not necessary, but it is ok to use the previous one. Try to change the last number when tested, and most of the time it works.
and this is what I came up with:
, I hope it’s helpful to you.

fatal error: Python.h: No such file or directory

Error:
system centos7.4 64-bit
python 2.7.5
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
#include < Python.h>
Command “/usr/ bin/python2-u-c” import setuptools, tokenize;
Command “/usr/ bin/python2-u-c” import setuptools, tokenize; The file = ‘/ TMP/PIP – build – r2TLym uwsgi/setup. Py “; F = getattr (tokenize, open, open) (file); Code = f.r ead (). The replace (‘ \ r \ n ‘, ‘\ n’); f.close(); exec(compile(code, file, ‘exec’)) “install –record/TMP/pip-jwt5ox-record /install-record. TXT –single-version –compile” failed with error code 1 in/TMP/pip-build-r2tlym /uwsgi/

Check the solution:
yum install python-devel.x86_64
Then run the installation and fix the problem.

DNS name does not exist

Apply for a server to be a file server on the cloud, use VPN connection between the cloud and the local network, and set the DNS of the cloud server to point to the DNS of the local network in the network.
but the cloud server was added to the domain with an error:
The error was: “DNS name does not exist.” (error code 0x0000232B RCODE_NAME_ERROR)
The query was for The SRV record for _ldap._tcp. Dc._msdcs.mydomain.com
Common causes of this error include The Following :
– The DNS SRV records required to locate an AD DC for The domain are not registered in DNS. These records are registered with a DNS server automatically when an AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:
192.168.1.2 instead
One or more of the following zones do not include Delegation to its child zone.
Mydomain.com
com
Set up various records in hosts, but there are still errors when adding them.
check DNS server did not find the existence of _ldap._tcp. Dc._msdcs.mydomain.com SRV record.
finally suspected that it was the DNS server problem. The DNS server I am looking at now is secondary, copied from the primary DNS server, and connected to the primary DNS of another network segment. As expected, there was this record. So on the secondary DNS you are creating a secondary domain, copy it from the primary DNS.
add again, and everything is fine.

Laravel 500 server error, perfect solution

After installing the Laravel project, open the Laravel for the first time

Solutions:
1. Open the configuration file laravel/config/app.php

3. Find ‘debug’ set to true

4. Run exception: No Application Encryption key has been specified.

5. Find.env. Example under Laravel, make a copy and rename it as “.env”

6. Execute the command: PHP Artisan Key: Generate under Laravel, then refresh the page
 

Perfect solution!

Failed to write output file ‘C:’ windows\ Microsoft.NET \Framework64\v4.0.30319\Temporary ASP.NET Files\root\106f9ae8\cc0e1

\ \Windows\ \Microsoft \ net \Framework64\ V4.0.30319 \Temporary ASP.NET Files\root\ 106f9AE8 \ CC0e1169 \ app_global.asax.haz99Mum. DLL “–” Denied access” “Error
 
Solutions:
 
1. Common solutions: the reason is that the Temp directory under the system directory does not have corresponding permissions, the specific operation is as follows: C:\Windows\ Temp –> Attributes – & gt; Safety – & gt; Edit – & gt; This can be resolved by adding read and write permissions for NETWORK SERVICE users.
 
2, open the server system C disk, open window, right click temp property security edit add IIS_IUSRS user control permission add modify and write permission. This is the Windows Server 2008 R2 standard edition SP1 64 bit Chinese version solution. That’s my question. This solves the problem. The network service above is ok without using it.)

EPERM: operation not permitted, symlink ‘../../’

The original address: http://www.zgljl2012.com/post-post/


Run in Windows10

grunt symlink

Error:

PERM: operation not permitted, symlink '../../'

This is because there are no permissions.
The solution
Press the shortcut Win + X, select “== command prompt (administrator) ==”, then enter your target folder in the window to perform the desired action. In this way, you can obtain the administrator’s permission to operate.

LINGO–Error Code 1017

Using the lingo (lingo 9.0), programming, appear such mistakes, at first thought it was your own code has a problem, check repeatedly, access to a variety of lingo tutorial, found did not resolve, wasted one or two in the afternoon time, quick fry, because the teacher to teaching software, and also don’t too care about is the version of the problem, it can’t find the way, to download the 11.0 version.

Package python3.1 + PyQt4 into exe

There are many programs that package Python as an exe, such as Py2exe, PyInstaller, and so on, but so far none of them support Python 3.1 well, so I’ll introduce CX_freeze 4.2.2 here, which also supports cross-platform running on Windows and Linux.
Cx_freeze download site is http://sourceforge.net/projects/cx-freeze/files/, want to undertake choosing according to install python version. For example, I am using python3.1, so I will download the file cx_Freeze- 4.2.2.2.win32-py3.1.msi. After running the installation package, the program is copied to the Python directory. There are two main places, one is C:/Python31/Scripts and the other is C:/Python31/Lib/site-packages/cx_Freeze
 
In previous versions of cx_Freeze, py was converted to exe through the script Freezepython.py, but in 4.2.2 Freezepython.py is gone and the main work is done by the C:/Python 31/scripts cxfree.bat.
There are two main ways to complete python exe packaging using cx_Freeze:
First, run cxfreeze. Bat directly through:
Go to the CMD command line, enter the C:/Python 31/scripts directory, and run cxfreed.bat-h to see its instructions. We can do an experiment with CX_freeze’s own sample.
Go to C :/ Python 31/scripts/ and run
cxfreeze C:/Python31/Lib/site-packages/cx_Freeze/samples/PyQt4/PyQt4app.py –install-dir=d:/123
Pytqt4app.py is packaged as exe, and the libraries it USES are also evaluated in the d:/123 directory.
 
Second, run setup.py:
In the example provided with CXfreeze C:/ python31/lib /site-packages/cx_Freeze/samples/PyQt4, there is a setup.py file. Open this file and we find that it is:

By running this script, packaging can be done automatically:
For example, if you go into C:/ python31/lib /site-packages/cx_Freeze/samples/PyQt4,
run
setup.py build
After that, a build/exe.win32-3.1 directory will appear under this directory, where you can see the packaged exe file. We want to package our script, copy this setup.py over, and put it in
executables = [Executable(“PyQt4app.py”, base = base)])
Change pyqt4app.py to your own script name.
 
Problems during packaging:
For Chinese support, if there is Chinese in the script and the encoding format is not specified, the packaging process will occur: UnicodeDecodeError: ‘utf8’ codec can ‘t decode bytes in the position of 1602: invalid data this kind of mistake, this blog post on http://www.cnblogs.com/xinzaitian/archive/2010/12/10/1902481.html, the author mentioned Chinese must be deleted.
In fact, Chinese characters can be retained by adding the following at the beginning of the script file:
#! /usr/bin/env python
#coding=utf-8
It is ok
 
Another problem is that if the packaged EXE file is run under “desktop” or other Chinese path, a window will pop up showing “Cannot get zipimporter” instance. So far, no good solution has been found

Parse error: syntax error, unexpected end of file in XXXXXXXX

Something similar appears in PHP programs
Parse error: syntax error, unexpected end of file in XXXXXXXX on line xx
The error.
If you find nothing wrong with the SYNTAX of PHP itself. Short tags may be used, such as:
< ?}?>
The solution to this problem is:
You can set short_open_tag = On
in php.ini

———————————————————
What is short_open_TAG?

determines whether the abbreviated form of the code start flag is allowed (< ??> ). If you want to use PHP in conjunction with XML, you can disable this option to embed < ?xml ?> . Otherwise you can output it through PHP, for example: < ?php echo ‘< ?The XML version = “1.0” ‘; ?> . If disabled, you must use the full form of the PHP code start flag (< ?php ?> ).

note: this instruction also affects the abbreviation < ?=, and < ?Echo equivalence. Using this abbreviation requires that the value of short_open_TAG be On.