ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:yes)Workaround for the above two errors under WindowsTools/Materials
First, the main MySQL masterBoth MySQL can read and write, the main preparation, the default is only one (Mastera) responsible for data writing, the other (Masterb) standby;Second, MySQL read and write separationFirst, the master and slave, the read
In the maintenance process, we are more tangled in the format of the Time field, I combed today, MySQL other common syntax and oralce basic similar (including comments and so on with the same as Oracle), the difference is the same date type.The time
#python3 connecting MySQL instancesImportPymysql"""Import connection MySQL required package, do not install pymysql need to install using command line switch to python installation path under Scripts subdirectory installation (pip install pymysql)"""
MySQL database modify character set, introduce the method of modification1) System Tools Iconv#file filename#mysqldump--default-character-set=utf8 >20180523xxx.sql#file 20180523xxx.sql#iconv-t utf8mb4-c 20180523xxx.sql>20180523xxxutf8mb4.sql#file 20
Encounter a project, need to find a lot of information across the table, tidy up, easy to use again later
Background: On a MySQL server ( Note: Two databases must be on the same MySQL server ) There are two databases:
Memory (store
Tag: Now ()--Current time int select extra format MySQL date form1 --query data for the whole day yesterday2 SELECTDate_format (Date_sub (now (), INTERVAL1 Day) ,'%y-%m-%d 00:00:00') as 'Yesterday start time', Date_format (Date_sub (now (),
When executing the script, you need to keep up with the database name you need to back up, as follows#!/bin/bash#auto backup MySQL#20180522 by Jzh##################################Define PATH definition Variableback_dir=/data/backup/mysql/' Date +%y-
Authorization method for the user.in the directory /etc/mysql find my.cnf, with Vim editor, find my.cnf insideBind-address = 127.0.0.1to annotate it.then log in to the MySQL database with root.then enter mysql> here: Grant all on * * to [email
When we use MySQL, we often need to change the root user password for different reasons, this blog mainly describes several ways to modify the root user password.
Before the root password is set:
How to SET the password command:mysql -u
First, the grammar
Select Grouping function, after grouping field from table "where filter Condition" Group by Group Field "Having group filter" "Order by Sort List"
Second, the characteristicsPre-grouping filter: Where-original
First, the application scenarioWhen the number of entries to be queried is too many, one page is not fully displayedSecond, the grammarSelect query list from table limit "offset," size;2.1. Note:Ffset represents the starting entry index, which
First, meaningUnion: Merging, combining, merging multiple query results into one resultSecond, the grammarQuery Statement 1 Union "all" query Statement 2 Union "all" ...Third, significance1. Split a more complex query statement into multiple
Selection of data typesSelect the appropriate data type for the fields in the table :When a column can select more than one data type, it should take precedence over the number type, followed by the date or binary type,Finally, the character type.
give this user all permissions (all) to manipulate all tables in all databases (*. *)Grant all privileges on * * to ' test1 ' @ ' 192.168.1.196 ';Create user and authorization, use a statementCreate user Test3 Specify IP and assign permissions
Create a new event in the event SQLyog a database and write the code:DELIMITER $ $ALTER definer= ' root ' @ '% ' EVENT ' 0 ' on SCHEDULE every HOUR starts ' 2018-04-18 00:00:00 ' ENDS ' 2028-12-31 00: 00:00 ' On completion no PRESERVE ENABLE do
1. Distributed transaction1) Talk about distributed transactions, talk about solutionsHttps://www.cnblogs.com/savorboard/p/distributed-system-transaction-consistency.html2) Distributed System Transaction Conformance
1.shell Script Execution If you use the current directory to execute, what do you think the command line is./xxx.sh2.A left join B, which table data is primaryA3. What are grouped functions, syntax, and filtered SQL? What's the point of note?GROUP
EmmmmmOne of my friends said 11 o'clock this evening that his database was deleted. was deleted yesterday. I'm on the day. MMP the database does not do backup??????????What FuckThen log on to the server and see.See there's another April 22. Then
1. Duplicate table structure:CREATE table newName like oldname;//can copy all structures.Or:CREATE TABLE NewName SELECT * from Oldname where 1<>1;//the Where condition is not true, only the structure can be copied, content cannot be copied, and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service