MySQL Getting Started tutorial Chapter
MySQL database query
SELECT * FROM tableSELECT * FROM table1, table2, ...SELECT field1, Field2, ... From table1, table2, ...SELECT ... From ... WHERE conditionSELECT ... From ... WHERE Condition GROUPBY
The article examples of MySQL's 1067 errors in a variety of solutions, so that people encounter this error can quickly refer to the solution.
Content:
MySQL Error 1067: Process terminated unexpectedlyThis problem bothered me for a morning, very
10GB of DiskSpace100GB of bandwidthBasic PHP SupportOnline SupportFTP AccessSimple Control PanelNo ads *99% of normal running time
Description: If you want to bind your own domain name, then be sure to fill in when the application is clear.
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
Solve the problem of garbled web pages, defined in the program query
The code is as follows
Copy Code
db = MySQL _connect ("localhost", "User", "password");mysql_select_db ("message", $db);mysql_query ("SET NAMES ' UTF8 '
The following are the configuration steps:1, the MySQL configuration file my.cnf location
2, how to start, stop MySQL, find a good startup file
Assuming that there are two machines, MySQL has been installed (as far as possible version, and two
Problem one, the log log is too large will lead to MySQL prompts error writing file ' xxx ' (errcode:28) error, the solution is very simple.
1, clean up the disk, free space;2, SQL statement query the original table data is too large, optimizing
1, find the problem of the program to join Mysql.colse () can be resolved.
2, directly modify the MySQL configuration, set time_wait time of not more than 5 seconds can
modifying methods in Linux systems
The code is as follows
See the solution below
The log logs are turned on for the following reasons:
111121 15:15:22 [ERROR] Failed to open the relay log './dong-relay-bin.000002′ (Relay_log_pos 1067)
111121 15:15:22 [ERROR] could not find target log during relay log
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
Question One
111217 23:23:57 Innodb:database is not shut down normally!Innodb:starting crash recovery.innodb:reading tablespace information from the ... ibd files ...innodb:restoring possible Half-written data pages from the
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
, and can not return to other fields, this problem let me worry for a long time, with the distinct can not be resolved, I only use the double loop query to solve, and so for a very large amount of data station, it will undoubtedly directly affect
1, mysqldump1.1 BackupMysqldump is a SQL-level backup mechanism that guides data tables into SQL script files and is relatively appropriate for upgrades between different versions of MySQL, which is also the most common method of backup. Now let's
All databases to one file:
The code is as follows
Copy Code
#!/bin/bashdate=$ (date + '%y%m%d ')to_dir= "/home/wyl/document/Daily/230_database"Date_dir=${to_dir} "/" ${date}Hostname= ' 192.168.1.230 'Username= ' Root
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
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