MySQL's access control technology is powerful and more flexible than postgres. MySQL uses username and password encryption algorithms that are not the same as UNIX systems, and their username can be up to 16 characters long. First log in to MySQL as root, and then type grant all privileges in *.* to thj@localhost identified by ' thj ' with GRANT option under the MySQL prompt. This way, no matter where the user thj from to the server can use MySQL.
(6) MySQL database simple operation statement
Creating a Database Command: Create database name; Delete Database Command: drop database name; Find out what databases are in MySQL Command: show databases; Change the database currently in use Command: Use Tbl_name Create a datasheet Command: CREATE TABLE Tbl_name (COLUMN_SPECS); Description: Tbl_name data table name column_specs table column Query the structure of the specified data table Command: Describe Tbl_name; What data tables are in the query database Command: Show tables; Add new record Command: INSERT into Tbl_name (col_name1,col_name2,...) VALUES (Values1,values2,....) Description: Insert statement is easy to use, but it also has a flaw that only one record can be inserted at a time. Bulk load Data Command: Load Data local infile "filename.txt" into table tbl_name; Description: MySQL version must not be less than 3.22.15, otherwise the load data local does not work. The statement actually invokes the/usr/bin/mysqlimport. Retrieving information Command: Select what to select from one or more table where data must meet the conditions Note: In MySQL, after each command is typed, at the end of the command line, enter ";", the flag is a command, or hit the go after the return, prompting the system to execute the above command; In addition, in most of the reference books on MySQL, the commands are uppercase, and in fact lowercase are also available; The use statement can be without ";", which is the only statement in all MySQL languages that you do not need to add ";" Note: MySQL installation is over
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.