Create databases and tables for MySQL in PHP
The database has one or more tables.Create a databaseThe create database statement is used to CREATE a DATABASE MySQL.Syntax
CREATE DATABASE database_name
For more information about SQL, see our SQL
What is MySQL?MySQL is a database.The data stored in MySQL is called a table as a database object.A table is a collection-related data input, which consists of columns and rows.Database is useful when storing information, flatly. A company may have
In mysql, UNION queries can be combined with multiple tables. union is only a small point of the Combined Query in mysql. Next I will introduce various statements for the combined query in mysql, for more information, see.
Query:In the select query,
There are many methods to remove duplicate records in mysql, and mysql also has a DISTINCT keyword. Next I will introduce you in detail to remove SQL statements for Repeated Records, for more information, see.
SQL SELECT DISTINCT
In mysql, we use order by id and the like most. This is generally a numerical sorting. If we want to sort Chinese in mysql, how should we write it, the following describes how to sort Chinese Characters in alphabetical order.
Method Statement of
This article is a friend who suddenly forgot the ROOT user password retrieval method when using mysql, that is, forced password change. Just set a new login password for mysql.
Note -- skip-grant-tables can disable permission Verification
1. Modify
I personally think that the methods for changing the mysql root Password are similar in both linux and windows systems. Next I will explain how to reset the MySQL ROOT Password in Linux, for more information, see.
Restart mysql root Password
Method 1
This article will introduce to you how to solve the problem that MySQL cannot be started due to full log space. If you encounter such problems, you can refer to it.
Today, I received a monitoring email saying that my blog Access failed. Open the
When phpmyadmin is used to connect to the database today, ERROR 1045 (28000): Access denied for user \ 'root \ '@ \ 'localhost \' (using password: YES) is prompted ), this prompt indicates that the password is incorrect, but the password is correct.
This article introduces how to use GRANT in mysql to GRANT permissions to users. It also introduces commands for revoking permissions and Deleting Users. I hope some methods can help you.
User authorization method
You can add new users by issuing
This article introduces how to batch Delete tables with the same prefix and modify table names in mysql.
If many tables need to be deleted and the table has the same prefix, we may need the following statement:
The Code is as follows:
The mysqldump command is a built-in database backup, restoration, import, and export command in mysql. Next I will introduce you to the usage of the mysql mysqldump command in data import and export in applications. For details, refer.
The basic
In mysql, the update statement is used to update the records of tables in the specified database. It can also be updated in batches. It can be used with the mysql update where condition to specify the data to be updated, next I will introduce you to
Redis is a key-value storage system. Similar to Memcached, Memcached supports more storage value types, including string, list, set, and zset) and hashs (hash type), I will share with you the installation and testing of redis and common
Today, I found in mysql that there is such a select * from bb order by null sentence that cannot be seen, later, I found out that order by null is used to forcibly disable sorting of query results.
Order by null is used to forcibly disable sorting
There are many ways to implement automatic mysql backup. The most common method is mysql master-slave synchronization for data backup. below I will introduce to you a detailed explanation of mysql master-slave configuration for database
Event Scheduler is a new mysql event. It queries a Scheduler task class function. We can create an Event in mysql to regularly execute some SQL statements, in this case, we do not need to use the scheduled tasks of the system to execute the
Many new mysql users may be confused about the difference between where and having in mysql. Let's take a few simple examples to introduce the difference between where and having.
Let's run two SQL statements first:
The Code is as follows:
Generally, the server IP address cannot be changed at will. If the mysql Master/Slave fails to be changed, I will introduce the process of changing the IP address of the master server under MySQL Master/Slave replication.
All the servers of the
The cpanel panel is a host management system. Many IDC vendors may use the cpanel panel. How can we create and manage a mysql database in the cpanel panel, here is my summary.
To create a new MySQL database, you only need to perform the following
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