MySQL Command

xiaoxiao2021-03-30  213

MySQL command:

Mysql -h host address -u username -P password connection mysql; if you just install MySQL, Super User root is no password.

(Example: mysql -h110.110.110.110 -uroot -p123456

Note: u and root do not need to bind gains, others are the same)

EXIT exits MySQL

Mysqladmin -u User Name -P Old Password Password New Password Modify Password

Grant SELECT ON Database. * To User Name @ Login Host Identified by / "Password /"; Add new user. (Note: Different from the above, because it is the command in the mysql environment, then take a semicolon as the end of the command)

Show Databases; Displays a list of databases. Two databases are just started: mysql and test. The mysql library is very important that there is a MySQL system information, we change your password and add users, actually use this library to operate.

Use mysql;

Show tables; Data table in the display

Describe table name; display the structure of the data sheet

CREATE DATABASE library name; Jian Library Mysql Command

USE library name;

CREATE TABLE Name (Field Settings List);

DROP DATABASE library name;

DROP TABLE table name; delete libraries and deleted tables

DELETE FROM table name; empty

SELECT * FROM table name; display record in the table

MySQLDUMP --Opt School> School.bbB Backup Database: (Command is performed in DOS // mysql // bin directory); Note: Back up the database School to School.bb file, School.bbb is a text file, file name Cut, open and see if you have new discovery.

Add commands under Win2003 system (Practical part):

The shutdown / parameter off or restarts the local or remote host.

Parameter Description: / S Turn off the host, / r restart the host, / t number setting delay time, range between 0 to 180 seconds, / a cancels the remote host specified by the boot, / m // ip.

Example: Shutdown / R / T 0 Restarts the local host (free)

The PID of the taskill / parameter process name or process terminates one or more tasks and processes.

Parameter Description: / PID To terminate the PID of the process, you can use the tasklist command to get the process name of the process of the process, / iM to terminate, / f, terminate the process, / t terminate the specified process and the child of the child.

Tasklist displays the process identifier (PID) of processes, services, services, services that are currently running on local and remote hosts.

Parameter Description: / m Lists the DLL file loaded by the current process, / SVC displays the service corresponding to each process, and only lists the current process when there is no parameters.

转载请注明原文地址:https://www.9cbs.com/read-130635.html

New Post(0)