Below we take the windows2003 system as the example, only needs to set up the MySQL to start the user to be possible
, error code 1069 is the login information there is a problem, carefully think about it, is that I changed the password of
1. To optimize the query, you should try to avoid full table scan, first consider the where and the order by the columns involved in the establishment of the index.
2. The null value of the field in the WHERE clause should be avoided as far as
MySQL concurrency is strong, fast response, excellent performance of the database software; PHP is a powerful server-side scripting language. The author uses PHP4.0 MySQL3.23.38 to establish a variety of applications in Shanxi Aluminum plant website
Workaround:
1. Add the "binary" attribute to the field containing Chinese as a binary comparison, such as changing "name char (10)" to "name char" binary.
2. If you use the source code to compile MySQL, you can compile MySQL using
SUBSTR () is equivalent to the substring () function, and substring () is very powerful and flexible.
1. Intercept string from leftLeft (str, length)
Description: Left (intercepted field, intercept length)
1, left (str,length); Select Left
MySQL sometimes because of power off or other causes of the database corruption, the wrong message is as follows:
Mysql:can ' t Open file: ' Sdb_sessions. Myi '. (errno:145)
For more information, and the Support Center at
We can use MySQL's own
Second, the grammarMATCH (Col1,col2,...) Against (expr [search_modifier])Search_modifier: {in BOOLEAN MODE | With QUERY expansion}For example: SELECT * from Tab_name WHERE MATCH (col1,col2) against (Search_word);The table here needs to be MyISAM
Format: Grant Select on database. * To User name @ login host identified by "password"
Example 1, add a user test1 password for ABC, so that he can log on any host, and all databases have query, insert, modify, and delete permissions. First connect
MySQL Database link Query class
Class Mysqlquery{var $sql;//sql Statement Execution resultsvar $query;//sql statementvar $num//return number of recordsvar $r;//return arrayvar $id//Return database ID numberExecute mysql_query () statementfunction
Nonsense not to say, although you can install MySQL directly through the Yum, but in order to be able to have a clearer understanding of the installation process, we still use the source code to compile the installation.
The code is as
The first type of manual simple to join can be implemented automatically start MySQL, behind is nothing to do write a section of the Shell code.
MySQL set to Linux service
The code is as follows
Copy Code
At the same time, the amount of online access continues to increase for 1G memory server Obviously feel the difficulty of severe when even every day will panic or occasional server card This problem once bothered me for more than half a month MySQL
The safest state is to operate on the console of the server and unplug the network cable.
1. To modify MySQL login settings:
# VI/ETC/MY.CNF
In the paragraph of [mysqld], add a sentence: Skip-grant-tablesFor example:
SQL Server randomly reads several records from a table:Example: The code is as follows:Copy code Select top 10 id, title from news order by newid () After optimizationIn MSSQL, the following method is used to randomly read more than data
MySQL is a database software with excellent performance, and PHP is a powerful server-side scripting language. In the development of Shanxi Aluminum Factory website, I have used PHP4.0 + MySQL3.23.38 to establish a variety of applications. Next, we
When you connect to a MySQL server, you should usually use a password. The password is not transmitted in plain text on the connection.All other information is transmitted as text that can be read by anyone. If you are worried about this, you can
For demonstration, we first create two tables with bad indexes and get some data.Mysql> show create table test1 \ G* *************************** 1. row ***************************Table: test1Create Table: create table 'test1 '('Id' int (11) not null,
1. MySQL slow query log analysisPt-query-digest analyze slow query logsPt-query-digest-report slow. logReport slow queries in the last 30 hours:Pt-query-digest-report-since 1800 s slow. logReport slow queries within a period of
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