1 error 2002 (hy000): Can't connect to local MySQL server through socket '/var/lib/MySQL. Sock' (2)
MySQL not started
2 error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: No)
The password is incorrect. Modify the
After installing mysql-Python, the import module prompts the following error,Importerror: libmysqlclient_r.so.16: cannot open shared object file: no such file or directory
So Google summarized the solution:
Soft link all the so files about
Assume that MySQL is installed on the C: disk, the MySQL database username is root, the password is root, the database name is Alfresco, And the backup database is stored under the D: disk root directory, the backup database name is alfresco_20070713
Common functions for operating Mysql Data in C Language
Required header file: # include
Function: obtain or initialize a MySQL structure.
Function prototype: MySQL * mysql_init (MySQL * MySQL)
Function return value: A Starting MySQL * handle
Note:
1. Install Lamp
Sudo apt-Get install apache2 mysql-server mysql-client PhP5 php5-gdPhp5-mysql
Most lamp operations are related to the/var/WWW directory. For convenience, modify the directory permission to be accessible by common users.
Sudo
1) create a table from MySQL (MySQL here refers to the database rather than the database software), and set to add Chinese characters. The Code is as follows:
Create Table ef_ads_position
(
Position_key varchar (40) not null,
Position_readme varchar
1. Before installation you need to download the following package a) apache2website: http://www.apache.orgDownload URL: http://apache.justdn.org/httpd/httpd-2.0.55.tar.gzb) php5website: http://www.php.netdownload URL: http://cn.php.net/get/php-5.1.1.
Guidance:1. back_logSpecify the number of possible MySQL connections. When the MySQL main thread receives many connection requests in a short time, this parameter takes effect. Then the main thread takes some time (although very short) to check the
7.4.8 control flow Functions
IFNULL(expr1,expr2)
If
expr1No
NULL,
IFNULL()Return
expr1Otherwise, it returns
expr2.
IFNULL()Returns a number or string value, depending on the context in which it is used.
mysql>
Directly install and download the RPM package. Sometimes, the installation will fail due to the lack of MySQL dependent libraries.
You can run the following command to install the mysql client, server, and C Language Development Environment:
Sudo
1. Change the table.It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log in to MySQL on the computer of localhost, and change the "host" entry in the "user" table in the "MySQL"
1. ALTER TABLEAlter table is used to create a common index, a UNIQUE index, or a primary key index.
Alter table table_name add index index_name (column_list)Alter table table_name add unique (column_list)Alter table table_name add primary key
Download mysql package
Http://dev.mysql.com/downloads/mysql/
Http://download.softagency.net/MySQL/Downloads/MySQL-5.5/
Create a mysql installation directory
[Root @ dianzhui ~] # Mkdir/usr/local/mysql5.5.12/
Create a mysql account
[Root @
A few times ago, When I updated the database, I met a new table statement and found that the inserted null values are automatically filled. This is very confusing. Let's talk about the case first. Below is a simulated test:
First create a table:
This article introduces the database index, and its advantages and disadvantages. The features and applications of MySQL indexes are described in detail. This article analyzes how to avoid MySQL unavailability, how to use explain to analyze query
Back up data using commands
MySQLl provides a mysqldump command, which can be used for data backup.
Enter the password as prompted. In this case, all the table structures of the tm database and # mysqldump-u root-p tm> tm_050519. SQL data are backed
Document directory
7.2.11 how to avoid full table Scan
7.2.15 other optimization ideas
7.2.9 how to optimize MySQL
ORDER BY
In some cases, MySQL can directly use indexes to meetORDER BYOrGROUP BYClause without additional sorting.
AlthoughORDER
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.