MySQL Create data tableThe following information is required to create a MySQL data table:
Table name
table field Name
Define each table field
GrammarThe following is the general SQL syntax for creating MySQL data
OverviewThis article mainly introduces some common SQL optimization techniques.SQL Optimization1.select * FROM table_name where;It is recommended to change the * to the required column. This does not have a noticeable effect on speed, mainly
The name of MySQL master-slave replication is actually: Copy data from one server to another server and execute it again. One server is treated as a primary server (master) and one or more servers as a Slave server (SLave) during the replication
Suddenly remember to write an article about changing the hive metabase from the default local derby to a remote MySQL, and in the cloud note, I turned it over and found it, and now I share it with you.Environment:operating system:
How to access MySQL under DOS1. Go to the MySQL installation directoryCD C:\Program files\mysql\mysql Server 5.6\bin2. User LoginMysql-hlochlhost-uabc-pabc-H: Indicates the server name, Lochlhost is native-U: User name-P: Password, if the user does
Check whether MySQL is installed on Linux:$ sudo service MySQL startUbuntu Linux installation configuration mysql:$ sudo apt-get install Mysql-server$ sudo apt-get install mysql-clientAfter the installation is complete, use the command to verify
1.mysql (MARIADB) How to change the root password, the first step is to switch to the root user2.mysql (MARIADB) How to change the root password, mainly using the mysqladmin command; Full command: mysqladmin-u root-p password newpasswd;Statement
Briefly talk about the backup type of MySQL:Hot backup: Read, write not affectedWarm backup: Can only perform read operationsCold backup: Offline backup, read and write operations are abortedPhysical Backup: Copying data files directlyLogical backup:
CMake Cross-platform compilers:CMAKE specifies compilation options in a different way from make, which is implemented in the following way:./configure--CMake../configure--help--CMake. -lhMysql0. Create MySQL users and related groups:#groupadd-R-G 306
Note: Root privileges are requiredOne database installation 1 installation dependentCMake, g++, Libncurses5-devUse Apt-get install directly2 Creating good users and directoriesGroupadd MySQL # Add user groupUseradd-r-G MySQL MySQL # Add
Sometimes we want to reinstall MySQL after uninstalling MySQL, this time prompt ' already has the MySQL service exists, is running ' and so on, because we did not uninstall MySQL before uninstall cleanly, this time will be removed from the registry;
1. Find the foreign KEY constraint name for the databaseSELECT A.constraint_name,b.table_name from INFORMATION_SCHEMA. Referential_constraints A,information_schema. TABLES b WHERE a.table_name=b.table_name and B.table_schema = ' test ';2. Delete a
Installing MySQL on Ubuntu is very simple and requires just a few commands to complete. 1. Sudo apt-get install mysql-server 2. Apt-get Isntall mysql-client 3.sudo apt-get install Libmysqlclient-devDuring installation, you will be prompted to
1. Single InstanceNow stop the database/etc/init.d/mysqld stopUse the following command to log inMysqld_safe--skip-grant-tables--user=mysql &You can now log in using MySQLMysql-urootAnd then you can change the password.Update Mysql.user set Password=
1. Single Instance ScenarioNow stop the database/etc/init.d/mysqld stopStart the database with the following commandMysqld_safe --skip-grant-tables --user=mysql &You can now log in using the MySQL commandMysql-urootAnd then you can change the
When you execute the command at a command prompt, the following error is reported[Email protected]]# mysqladmin-u root password "Sorry"Mysqladmin:connect to server at ' localhost ' failederror: ' Access denied for user ' root ' @ ' localhost '
1, when only one row of data is used with LIMIT 1If you explicitly take only one piece of data, add limit 1;2, Avoid SELECT *, get fields as neededYou should develop a good habit of taking whatever you need.3, use ENUM instead of VARCHARThe ENUM
Mysql bit operation
1. MOD (X1, X2) calculates the remainder and returns the same remainder as "%" 2. X1 DIV X2 returns the operator for Division. The same as "/" 3. If the divisor is 0, the result is NULL. 4. and = are the same. They are used to
Database Management for MySql learning, mysql learning database
To learn mysql Data step by step, you must first manage mysql Data.
1. Create a database
Command Format: create database [if not exists] database_name.
In actual use, [] is not required.
Create a simple tutorial for creating a MySQL database
Use mysqladmin to create a database:
Special permissions are required to create or delete a MySQL database. Therefore, if you access the database as a root user, you can create any 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