Document directory
1.1 connect to MySQL
1.2 change New Password
1.3 new users added
1.4 Start and Stop MySQL
2.1 database operations
2.2 table operations
3.1 export database files from a database
3.2 importing data from external files to
Next we will discuss another aspect of database performance optimization, that is, using the built-in tools of the database server to assist in performance analysis and optimization.
▲Show
Run the following command to check the running status of the
This article describes how to create and delete databases in MySQL and how to operate related PHP scripts. here, we will focus on command operations under mysqladmin in Linux. For more information, see
Use mysqladmin to create a databaseFor normal
We will discuss another aspect of database performance optimization, that is, using the built-in tools of the database server to assist in performance analysis and optimization. ▲Run the following command on SHOW to check the running status of the
▲Run the following command on SHOW to check the running status of the server: mysqlshowstatus. this command displays a long column of status variables and their corresponding values, including the number of users who have been aborted, the number of
1. MySQL Common commands 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; Detailed description of the table
Add
Show databases: displays databases on the current server
Database specified by use databasename
Create Table tablename (...)Example:Create table Information (ID int, Name text, address text, age INT );Insert into information values (1, "huitailang"
Common oracle database commandsConn is used to connect to a new user. It is often used to switch the user's conn user name/password to connect to the new user show user to view the current user disc to disconnect the current connection, but do not
Using Mysqladmin to create a databasewith ordinary users, you may need specific permissions to create or delete MySQL databases.So we're logged in with the root user and the root user has the highest privileges and can use the MySQL mysqladmin
Backup data:
The code is as follows
Copy Code
Mysqldump-u User name-p password database name > Xx.sql
When the volume of data is large, you can use gzip compression
The code is as follows
Copy
1, Connection MySQL format: mysql-h host address-u user name-P user Password1. Connect to MySQL on this machine. First open the DOS window, then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter after the prompt you to
1. MySQL database operation 1. createdatabase syntax for creating database commands: createdatabase database name. When creating a database, the database name has the following rules: 1. It cannot be the same as other databases; otherwise, an error
MySQL tutorial Creating a database Tutorial commands and statements
Creating a DatabaseThe CREATE DATABASE statement is used for creating databases in MySQL.
GrammarCREATE DATABASE database_name In order for the PHP tutorial to execute the above
We want to discuss the database performance optimization on the other hand, that is, the use of database server built-in tools to analyze and optimize.
▲show
Perform the following command to understand the running state of the server:
MySQL >show
The following articles mainly describe the commands of the DB2 database in the linux operating system, if you are interested in the commands of the DB2 database in the linux operating system, you can click the following article to view the
Each MongoDB server supports multiple databases. Each database is relatively independent. For security purposes and convenience of management, the database data is also stored independently.
Mongo metadata
In the MongoDB database, the
All running databases can be shut down using the SHUTDOWN command, which is the same as an SQL command. When the SHUTDOWN command is executed, all running database commands will be rolled back. Meanwhile, the cataloguing file will be saved to a form
/// /// SQL Server transaction sample class to demonstrate SQL transaction operations/// By Camus)/// Public class sqlservertransactiondemo{Private sqlservertransactiondemo (){}
/// /// Obtain the SQL Server transaction sample instance method/// ///
The following articles mainly introduce MySQL commands, including common MySQL database commands, modifying the actual root password in the MySQL database, and introducing the practical application of grant, the following describes the specific
Mysql database is a multi-user, multi-threaded relational database and a Client/Server structure application. It is free for individual and commercial users.Mysql Databases have the following advantages:
1. The number of users accessing the 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.