给Linux系统添加磁盘空间在工作会经常遇到. 在添加第二块磁盘一般系统默认为hdb(IDE硬盘)sdb(SCSI 硬盘),以hdb为例. linux-isep:~ # fdisk /dev/hdb The number of cylinders for this disk is set to 8322.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause
shell> fdisk /dev/xvdb #### 选择磁盘 Command (m for help): m #### 帮助 Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partitio
一.命令操作: df #查看磁盘空间 fdisk #分区/查看分区 mkfs #格式化 df -h(以人类易读) -m(以M为单位读取) #查看硬盘容量/查看 D #删除一个分区 I #列出已知分区类型 M #帮助 N #添加一个新分区 Q #退出不保存 T #更改分区类型ID W #保存并退出 二.静态分区: 在虚拟机添加硬盘,然后重启
解决虚拟机linux端mysql数据库无法远程访问 1. 在控制台执行 mysql -u root -p mysql,CentOS系统提示输入数据库root用户的密码,输入完成后即进入mysql控制台 2. 在mysql控制台执行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'MyPassword' WITH GRANT OPTION; FLUSH PRIVILEGES; 3. 在mysql控制台执行命令中的 'root'@'%