Start the navicat software and use "Link" to connect to the MySQL database. Ensure that the firewall can pass through before use.
Navicat for MySQL:
Http://www.jb51.net/database/2223.html
Then, enter a "connection name". Enter "host
Step 1-install MySQL
Download this server, MySQL GUI tool, and MySQL ODBC driver from http://dev.mysql.com/downloads. You can select 5.0, 5.1, or 6.0 servers. Then install them.
Precautions during installation:
Your Firewall should be set to allow
Example:
CopyCode The Code is as follows: Create procedure 'justifygroupnum '()
Not deterministic
SQL Security definer
Comment''
Begin
/* How to Run: Call justifygroupnum ()*/
Declare p_group_id int;
Declare p_num int;
Declare stopflag int;
Declare
Outer Join. Outer Join can be left Outer Join, right outer join, or complete external join.
When an external join is specified in the from clause, it can be specified by one of the following sets of keywords:
Left join or left Outer Join.The
1. Start and exit
1. Go to MySQL: Start MySQL command line client (MySQL dos Interface) and enter the password for installation. The prompt is: mysql>
2. Exit MYSQL: Quit or exit
Ii. Database Operations 1. Create a database
Command: create
I once
Used backup methods include mysqldump, mysqlhotcopy, backup table, and select.
OUTFILE, or BINLOG backup, or directly copy data files and related configuration files. MyISAM
Tables are saved as files, so they are relatively easy to back up.
Search for subdomains
For example, jb51.net searches for www.jb51.net, jb51.net, and host.jb51.net.
If mysql is used with like, the efficiency is very low. millions or even tens of millions of data cannot be used, so sphinx is used.
Many problems
MySQL provides different storage engines for different functional requirements. The so-called storage engine is the specific implementation of specific interfaces in MySQL.
FEDERATED is a specific implementation of remote databases. Generally, when
Having usage
Having clauses allow us to filter various data After grouping. where clauses filter records before aggregation, that is, before group by and having clauses. The having clause filters group records after aggregation.
SQL instance:1.
Recently, a very strange MySQL problem occurs. Using different select statements to query all datasets produces different records. Select * gets four records, and select field gets three records.For details, refer to the following query results:[SQL]
I. MySQL stored procedure parameters (in)MySQL stored procedure "in" parameter: similar to the value passing of function parameters in C language, MySQL stored procedure may modify this parameter internally, but modify the in type parameter, not
This article introduces some commonly used mysql commands for data import and export. As long as we hold these commands, we can quickly back up and restore the database.
Import and Export mysql Data to MB
Problem: the database and table data of MB
For comparison, the first step is to use the mysql stored procedure:
Copy codeThe Code is as follows: mysql> delimiter $
Mysql> set autocommit = 0 $
Mysql> create procedure test ()
Begin
Declare I decimal (10) default 0;
Dd: loop
Insert into
In addition to the index of different table names, the table structure is the same. If the 'id' field of each table still adopts the 'Auto _ INCREMENT 'method, ID cannot identify only one record.
In this case, an External table shard mechanism is
We will continue to use the previous example. The preceding table contains basic information about an employee, such as name, gender, date of birth, and place of birth. Create another table to describe the articles published by employees, including
1. Check whether the firewall on the server does not block port 3306.
The default port of MySQL is 3306. Make sure that the firewall does not block port 3306. Otherwise, the remote connection to MySQL cannot be established through port 3306.
If you
Because the database records may need to be reordered. In this article, I will talk about two ideas to improve the query efficiency of Order By statements for your reference.
In MySQL databases, Order by statements are frequently used. However, it
MySQL databases can be said to be one of the most common and common databases for DBAs. The wide application of MySQL also adds more people to the ranks of them. The following are some of the most common and frequently used MySQL Databases
MySQL queries the in operation. The query results are displayed in the in set order.
Copy codeThe Code is as follows: select * from test where id in (, 5) order by find_in_set (id, '3 ');
Select * from test where id in (3, 1, 5) order by
1. Establish a database connection
Copy codeThe Code is as follows: $ Mysqli = new mysqli ("localhost", "root", "", "mydb ");
?>
To establish a database connection, four parameters are required: Database address, database access username, database
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