一.新建数据库 1.首先登录MySQL:(输入 mysql -u root -p 命令,然后输入密码按回车即可) 2.在mysql> 下输入如下命令,回车,即可创建数据库 (test为数据库名): mysql> create database test; 二.授权用户 方式1.授权给本地主机 mysql> grant all privileges on test.* to 'userName'@'localhost' identified by '12345678'; (提示:test.…
当你新登录一个主机,过着管理一个主机,这时候你就需要这些命令来进行查看了: 1. w : Show who is logged on and what they are doing. w [options] user [...] 常用命令: w -h --no-header w -u --no-current w -s : Use the short format. Don't print the login time, JCPU or PCPU times. w -i, --ip-add…