1: Set the MySQL configuration file/etc/mysql/my.cnf find bind-address =127.0.0.1 to comment out;//function is to make it no longer allow only local access; restart Mysql:/etc/init.d/mysql Restart 2: Log in to MySQL database: mysql-u root-p mysql>
Yesterday just installed MySQL, playing a very happy, today is not linked, the error is:Root user does not have permissionsFlipping through some articles, looking at the inconvenient, I briefly summed up:One, add an accountThe account is: test; the
MySQL password forgot, operation steps:1. Service Mysqld Stop2, Vim/etc/my.cnf #编辑MySQL配置文件, find [mysqld], add a line below Skip-grant-tables3. Mysql-u root-p directly into MySQL console4. Update Mysql.user set Password=password (' MySQL new
Syntax Description:Way One:Case value when [compare_value] and then result [when [compare_value] then result ...] [ELSE result] ENDWay two:case is [condition] then result [when [condition] then result ...] [ELSE result] ENDExamples of Use:Mysql>
Start: net start mySql;Enter: Mysql-u root-p/mysql-h localhost-u root-p databaseName;List databases: show databases;Select database: Use DatabaseName;List table: Show tables;Show table Column properties: Show columns from TableName;Build database:
1. Create a new normal user--create statementsmysql> create user ' test1 ' @ ' localhost ' identified by ' test1 ';--Inserting with insertmysql> INSERT INTO Mysql.user (host,user,password,ssl_cipher,x509_issuer,x509_subject) VALUES (' localhost ', '
One afternoon in learning MySQL, the most valuable is this a little bitOrder by can arrange the position of the fields that appear in the select sentence Eg:select name,count (*) from the EG group by name order by 2;; The meaning of 2 here is the
MySQL data types are divided into:Integer type, floating-point type, fixed-point number typeDate and Time typeString typeBinary typeInteger type byte number unsigned number value range signed number rangeTINYINT 1 0-255-128-127SMALLINT 2 0-65535-3276
The first step is to read the BLOB data,The second step is to convert the BLOB data into a byte arrayThe third step is to convert the byte data into a string and return it with Base64 encryption.Fourth step, receive stringIn the fifth step, the IMG
If we take our database information as a book or a dictionary, then the index can be understood as its directory, if we create a good directory, then we will retrieve information much faster, if we create a slag residue index, it may also bring down
Time_to_sec (now (), From_unixtime (Time field))/86400 Compute days, Time field type is UNIX timestamp1, time_to_sec (time) returns the time parameter that has been converted to seconds.2, Timediff (expr,expr2) returns the time between the start
Insert Table Data:INSERT INTO table_name set COLUMNS_1=VALUE1,COLUMNS_2=VALUE2, the default value will be taken for columns that do not have an assignment, and this method can only insert one data at a timeInserting data using text:Load data local
Because a lot of failure problems are not, so in the process of recording are mostly statements, not so intuitive, the original intention is more like a record of their own resolution process, of course, if you have encountered the same problem, do
MySQL master-slave configuration, mysql master-slave Configuration1. Configure the master database. Assume that the master database IP address is 192.168.1.1. modify my. cnf and add the configuration server-id = 1 under [mysqld ].Log-bin = syslog ###
Design and writing of SQL language in MysqlI. SQL statement Classification
Data Definition Language (DDL ):
Defines and manages data objects, including databases, data tables, views, and indexes. For example, CREATE, DROP, ALTER, and other
Xin Xing makes mysql run faster. Section 1 Optimization Direction and Database Modeling
I plan to write a set of bibliography recently, that is, about mysql optimization. First, I will write it on my blog and then sort it into a pdf document. Of
Concatenate multiple mysql Fields
The following two functions can be used to concatenate the query result line Fields of Mysql:
1. concat Function
mysql> select concat('1','2','3') from test ;+---------------------+| concat('1','2','3') |+-----------
Installation illustration of MySQL
Mysql http://www.jb51.net/softs/2193.htmlThe following is an example of MySQL installation. It is installed using an executable file! Open the mysqlinstallation file mysql-5.0.27-win32.zip, decompress the file, 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