The project needs to reinstall a MySQL server on the existing server, it is very difficult, because it was in my notebook before the test, its system is Ubuntu, what path Ah, start the way ah. It's not the same, so this time it still makes me tangle:
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
In 5.1.46, the optimizer made a little change in the selection of the primary key:
Performance:while looking for the shortest index for a covering index scan, the optimizer did not consider the full row l Ength for a clustered primary key, as in
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>
The basic idea is: In JS dynamically create Select control option, through Ajax to obtain in PHP from the SQL database to obtain the city and province information, the code is a bit long, but many are similar, such as JS in the province, the city,
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
I've seen a lot of questions about Mysql.sock on the internet before, and I didn't pay attention to the meaning of this thing, until my MySQL also appeared the same problem. It's a tangled one ...
Copy Code code as follows:
The INFORMATION_SCHEMA database was created after version 5.0 of MySQL, a virtual database that does not physically exist.
The INFORMATION_SCHEMA database is similar to the "Data Dictionary", which provides access to database metadata in the form of
1. Create a column
ALTER TABLE tablename add COLNAME type NOT null default ' 0′;
Cases:
ALTER TABLE Mmanapp_mmanmedia add appid_id integer NOT null default 372;
2. Delete Column
ALTER TABLE tablename drop
Before starting the installation, explain the difference between mysql-5.6.4 and the lower version of the installation, from mysql-5.5, MySQL source installation began to use CMake, so when we configure the installation directory./configure--perfix=/
Considering the data security problem, prepare to migrate the database on the server to just mount the cloud hard disk, research, this method is the most reliable, share!
First set up the directory where the database will be migrated
Copy
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:
This example describes the MySQL pressure test script, shared for everyone to reference. Specifically as follows:
CREATE TABLE Dept
Copy Code code as follows:
CREATE Table Dept (/* Department Table * *
Deptno mediumint UNSIGNED not
When migrating to MySQL databases, it is sometimes necessary to migrate users and permissions within the source database. For this migration we can get the user's relevant permissions from the Mysql.user table to generate the corresponding SQL
After loading the database to clean up some default account, accidentally deleted root, flush privileges after the new root forgot grant any permissions, see mysqld options inside a −−skip-grant-tables
Copy Code code as follows:
Import CSV:
Copy Code code as follows:
Load data infile '/test.csv ' into table table_name
Fields terminated by ', ' optionally
Enclosed by ' "' escaped by '"
Lines terminated by ' \ r \ n '
Ignore 1 lines;
Guide CSV:
Copy
MySQL installation is often found not normal boot encountered the most error 2003 errors, the following is the solution:
Mysqld-nt-remove
Mysqld-nt-install
Restart MySQL
net start MySQL
There may also be a problem with the service 1067
(1) The simplest method of modification is to modify the character set key values in the MySQL My.ini file ,such as Default-character-set = UTF8Character_set_server = UTF8
After the modification, restart the MySQL services, service MySQL restartUse
Network environment:Host: Win7VirtualBox 4.1.4 + Ubuntu 11.10 Server 64bitHost use network cable, the client in bridged adapter mode, the use of Atheros AR8131 pci-e Gigabit Ethernet The Internet is no problem.When the host uses wireless, the client
MySQL contains support for triggers. A trigger is a database object that is associated with a table operation and is invoked when a specified event occurs on the table on which the trigger on which the action event touches the table executes.
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