When you use MySQL (show tables), you sometimes need to see information about tables and fields (whether the table and a field exist, etc.) ~ ~ and PHP provides such related functions as: Mysql_list_dbs (), Mysql_list_fields (), But the
First, start and exit1, into the MySQL:Start the MySQL Command line Client (MySQL's DOS interface) and enter the installation password directly. The prompt at this point is:mysql>or open the terminal and enter the SQL statement:Mysql–uroot–p123
2,
Interview MYSQLDBA encountered a problem:
Describes the implementation principle of MSYQL replication mechanism, how to recover data inconsistent slave database nodes without losing the MySQL main library?
MySQL Replication (replication) is an
1.
Converting a character's number to a number, such as ' 0 ' to 0, can be achieved directly by addingFor example: The D in the Pony table is sorted, and the definition of D is varchar, so you can solve
select * from Pony (d+0)2. In the case of
Drop user deletes all of the user's information, and delete only clears the users table, and other information, such as the DB table, exists.
If you create a user with the least privilege after delete, then he reuses the previous permissions.
Grant
Installation Environment:operating system: SuSE Linux 10Database: MySQL 5.0.22
Hope to know more experts, learn from each other to discuss technology!
First vent then this, the Internet to see more than the installation of MySQL articles, most of
A warning was found today when an index was added to the test environment
Root@test 07:57:52>alter Table article drop index ind_article_url;
Query OK, 144384 rows Affected (16.29 sec)
records:144384 duplicates:0 warnings:0 root@test 07:58:40>
DBAs or developers who have used Oracle or other relational databases have the experience of thinking that the database has been optimized for the subquery, that it is a good choice to drive the execution of the table, and then porting that
The master/slave mechanism based on LAN can usually meet the requirement of ' real time ' backup. If the delay is large, first identify the following factors:1. Network Latency2. Master Load3. Slave loadThe general practice is to use more than one
PHP Encapsulation MySQL Class
Copy Code code as follows:
Class Mysql {Private $host;Private $user;Private $pwd;Private $dbName;Private $charset;
private $conn = null;
Public Function __construct () {
$this->host = ' localhost ';
Export the Mysqldump tool that you want to use with MySQL, basic usage:shell> mysqldump [OPTIONS] database [tables]If you do not give any tables, the entire database will be exported.By executing mysqldump--help, you can get the options table
Contact with the replication, began to ponder their own to configure the next try, is a lot of problems: after the internet to check the data also good to ask students, and finally to solve some. Share your experiences now:The first problem is
When using the socket for the development of the network program, most of the cases will encounter the sending and receiving of characters, then if the string sent to the default way to deal with, you will generally get a bunch of garbled.
Because
MySQL's character set has more than one level, in the MySQL store Chinese, if the character set can not be correct, it is easy to appear garbled data. Today, there's a user who feeds him. Data in the database 1 o'clock in the afternoon began to
mysql_fetch_* Column functionThe main function of the mysql_fetch_* column function is to obtain the relevant query results from the result set returned by the query, mainly including:
Mysql_fetch_array (): Gets a row from the result set as
Python's MySQLdb module is a python-attached module to MySQL, and the default query result return is tuple type, and can only be accessed by 0,1. Index Subscript Access DataDefault Connection database:
Copy Code code as follows:
MySQL Create a merge table and partition table A bit similar, he is a MySQL feature, you can combine the MyISAM table with multiple structures to a virtual table, the surviving engine must be the merge, when the query from the merged table is like a
In the MySQL manual has a bit of max_user_connections, it is used to restrict user resources, how to restrict user resources? Here's a little test.
The value of the global variable is first producedMysql> SELECT @ @max_user_connections;
+-----------
Temporary tables are present when the connection is not disconnected, once disconnected, the data and structure of the temporary table are in memory, you can do a quiz, you create a temporary table, but in the response data directory will not find.
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