Show databases // list MySQL Server databases. Show tables [from db_name] // lists database data tables. Show table status [from db_name] // lists data tables and table status information. Show columns from tbl_name [from db_name] // lists the table
Chinese garbled characters often occur when PHP connects to the database. Generally, you only need to check whether the encoding is uniform to solve the garbled problem.
1. character encoding of the database:
You can set all encodings to UTF-8
Record what you see on the Internet
Http://www.mysqlperformanceblog.com/2009/04/15/how-to-decrease-innodb-shutdown-times/
The general method is:
First, reduce the innodb_max_dirty_pages_pct parameter value, so that data in the memory can be
Import the query result File
Select * from table into OUTFILE 'C:/aaa.txt ';
One statement imports multiple data records
Insert into web_menu (unitid, menu, ext1, ext2, ext3) Select ID, 'Resource integration website> key fields ', 0, '',''
In MySQL InnoDB, there is still a long time-consuming problem after the recovery fault. The original reasons are as follows:
When a fault occurs and the service is restarted, the recovery operation is automatically completed to restore the database
Mysqli in mysql5 is indeed worth using and learning carefully. Today I will look at some of the new
Features. For example, the preparestament support is added. The example is as follows (from the apress book)
// Create a new server connection
$
In some cases, MySQL can directly use indexes to meetORDER BYOrGROUP BYClause without additional sorting.
AlthoughORDER BYThe index is not exactly matched with the order of the index, but can still be used, as long as the unused index part and all
Http://www.ningoo.net/html/2008/mysql_innodb_parametes.html#more-322
As the most widely used transaction storage engine for MySQL, InnoDB is designed in many places in common with Oracle. For Oracle DBAs, it can be compared with some features of
Command for backing up MySQL databaseMysqldump-hhostname-uusername-ppassword databasename> backupfile. SQL
Back up the MySQL database in the format of a table with deletionBacking up a MySQL database is in the format of a table with deletion, so
Introduction to MySQL query cache (1)
The MySQL query cache and the Oracle query cache are different. The Oracle query cache caches the execution plan, while the MySQL query cache does not cache the execution plan but the entire result set. The
1. MySQL Common commands
Show databases; list all databases
Create Database Name; Create a database
Use databasename; select database
Drop database name directly deletes the database, no reminder
Show tables; displays tables
Describe tablename;
The following describes how to use Bae to connect to MySQL. The basic call is the same as the related MySQL functions of PHP:
Mysql_query-send a MySQL Query
Mysql_fetch_array-get a row from the result set as an associated array, or number array, or
Install PHP + MySQL + phpMyAdmin Apache in Windows (post)
PHP installation (directly decompress the version)
1. decompress the file to the disk you want to install,
Generally, we install it in the system disk directory. Change the directory name to
MySQL startup failed, error message
Error 2002 (hy000): Can't connect to local MySQL server through socket '/var/run/mysqld. Sock' (2)
Solution: VI/etc/MySQL/My. CNF, FindBind-address:
Original bind-address = 127.0.0.1
Change to bind-address = 19
[Tan junqing: Comparison between MyISAM and InnoDB] The most commonly used MySQL storage engine diagram is MyISAM. InnoDB is generally recommended to customers. MyISAM Storage Structure: three files (tablename. frm, tablename. MYD, tablenamemyi), do
Previously, I had the experience of successfully connecting to MySQL through JDBC when writing an application.Can I use the same code to connect to MySQL on a web page written in JSP?The result is no. When I copy the same code to a file, an error
Record the process of setting up MySQL Proxy:
Configuration:
A total of three Ubuntu servers are:
MySQL Proxy: 192.168.1.101 (untua)
MySQL 1: 192.168.1.104 (ubuntub)
MySQL 2: 192.168.1.103 (ubuntuc)
Install MySQL proxy on Ubuntu-:
Reference
Is your webapp system using a MySQL database system? Does your customer always complain that the page results are very slow? Is the load of your MySQL system always in a very high state? This article will provide you with a method to share the load
The following example uses the specified value starting from 1000.
1. Set it when creating a table:
Create Table 'test '(
'Id' int (11) not null auto_increment,
'Class' varchar (2) not null,
'Name' varchar (50) not null,
'Sex 'varchar (2) not
For example, the question is still worrying. There are also a lot of answers on the internet, varied, and I don't know who is right or who is wrong. I personally think there are several articles to solve this problem well. The following is a summary:
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.