Basic MySQL-basic database operations and basic mysql operations
1. Delete the database drop database name;
Mysql> drop database test;
Delete database mode
2. create DATABASE name;
Mysql> create database test;
In Windows and Linux, database names and table names are processed differently. In Windows, database names and table names are case-insensitive, while in Linux, database names are case-sensitive.
3. Create a dedicated user for database operations
Syntax Rules:
Create a new user and GRANT the database operation permission grant all privileges on database name. * TO username @ localhost identified by password
Mysql> grant all privileges on test * TO user $ localhost identified by '20140901 ';
This grants the user who connects to the database from the local database ALL the permissions (all privileges) to operate on ALL objects in the home database ). Permissions are used to measure the operations that a user can perform on the database. CREATE (CREATE) SELECT (Search) UPDATE (UPDATE) DELETE (DELETE) and other permissions are used. In addition, in the [test. *] section, perform operations on specific tables in the database.
4. log on to the database as a user
Mysql>-u user-p
Enter password :******
5. database used
USE the specified database USE Database Name
Mysql> use home;
6. If you forget the specified database when using the MySQL monitor, you can use the SELECT command to view the currently used database.
Displays the currently used database select database ();
Mysql> select database ();
MYsql database operations?
What do you want to do? Not clear
How can I learn the recommended learning materials for MySQL database experts? I am very grateful to you for listing them at the entry-level improvement level.
You can take a look at this book mysql database application from entry to mastery. This book is divided into three parts. The first is the basic MySQL database, which includes the basic concepts related to the database and the installation and configuration of the MySQL database. The second part is the standard SQL statement programming and application, including the operation database object, operation table object, operation index object, Operation view object, Operation trigger object and operation data. The third part is MySQL database management, which includes MySQL database user management and permission management, MySQL Database Log Management, MySQL database performance optimization, and PowerDesigner database design software.