Studying note 1 of mysql

1.Start the server:
 shell> mysqld  
 or
 shell> mysqld --console  : The server will continue to write to the console any further dianostic output it produces.
2.Shutdow the server
shell> mysqladmin -h -u  -p shutdown
such as shell> mysqladmin -h 192.168.12.252 -u root -p shutdown :the server in 192.168.12.252
            shell> mysqladmin -u root -p shutdown :the server in localhost
3.Start mysql as a window service.
shell> msyqld --install serviceName --defaults-file
such as shell>mysqld --install
            shell>mysqld --install mmgg
            shell<mysqld --install mmgg --defaults-file=c:/mmgg
4.Remove a server that is installed as a service.
shell> mysqld --remove serviceName
such as shell>mysqld --remove
            shell>mysqld --remove MySQL
5.Connect to the server.
shell> mysql -h -u -p 
such as shell>mysql -h 192.168.12.252 -u root -p
            shell>mysql -u root -p
6.Disconnect from the server.
mysql> quit(/q)
7.Show all databases.
mysql> show databases;
9.Chanage database.
mysql> use database;
10.Show all tables of one database.
mysql> show tables;
11.Describe one table.
mysql> describe tableName.
12.Load data into a table.
mysql> LOAD DATA LOCAL INFILE 'fileName' INTO TABLE tableName;
such as mysql>LOAD DATA LOCAL INFILE 'd:/mysql/data/user.txt' INTO TABLE user;
13.Show the selected database.
mysql> select database();
14.Describe table.
mysql> describe tableName;
such as describe user;




 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值