Mysql_ reset password

# Modification of coding “`pythonshow variables like ‘%char%’; #View the current encoding 1.Open configuration file: vim /etc/mysql/my.cnf 2.After [client] and [mysqld], add: [client] default-character-set=utf8 [mysqld] character-set-server=utf8 3.Restart mysql: service mysql restart“`       # mysqlreset password “`python#1.Open configuration file: sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 2. Add in the [mysqld] segment: skip-grant-tables #Skip permission to start MySQL 3.Restart MySQL service mysql restart 4.Log in with root, without pa...

Mysql notes

1、By default, Mysql compares strings in a case-insensitive manner, and if you want to make case-insensitive comparisons, you can add the Binary keyword, which means that strings are handled binarily. When comparing operations on strings, MySql will distinguish the size of strings.Write. For example: 2、When a number and a string are operated on, the string is converted to a number according to certain rules. If the first bit of the string and several consecutive digits after it are numbers, it is converted to the value of the number, otherwise, it is converted to 0. For example:  

Js- keyboard return search enter

This problem is often used in mobile version. <div class=”sousuo”>        <input type=”text” placeholder=”Please enter the keyword “id=” sousuo of the title of the article. onkeydown=”entersearch()”/> </div> css: .sousuo { width: 94%; height: 3.5rem; margin: 1rem auto; } #sousuo { display: block; width: 100%; padding-left: 10%; background: #f2f2f2; height: 3.5rem; border: none; outline: none; border-radius: .5rem; background-image: url(../images/Icon_sousuo.png); backgr...

Example of parameter in JS replacing URL

<script type="text/javascript"> var url = window.location.href; url = changeURLArg(url, "key", "Search value "), window.location.href = url; /* * url target url* Arg the parameter name that needs to be replaced.* the value of the parameter after arg_val is replaced.* return urURL after L parameter substitution*/ function changeURLArg(url, arg, arg_val) { var pattern = arg + '=([^&]*)'; var replaceText = arg + '=' + arg_val; if ...

JS refresh window, close windows

First, refresh windows.    document.location.href=document.location.href; Two. Close the window. 1、 Close the window without any hints. <a href="javascript:window.opener=null;window.open('','_self');window.close();">Close < /a> 2、Custom prompt closure <script language="javascript"> // This script is a generic script for IE6 and IE7. function custom_close(){ if (confirm("Are you sure you want to close this page? ")){ window.opener=; window.open('','_self'); window.close(); } else{} } </script> <input id="btnClose" type="button" value="Close the page ...

Some problems encountered after installing MySQL

After we have installed MySQL (mariadb is installed on cnetos 7), we have the following problem, which we can usenetstat -lntupView the port of the following server, and the port of MySQL is generally defaults to 3306,Check to see if the service is started, not started, start it, centos6: service start mysql, centos7: system CTL start MySQL : The problem with typing the mysql_secure_install command appears as shown in the following figure. It is also possible that the MySQL service was not turned on, just follow the above method Entering this command requires setting the password. The fir...