在VMware下增加空间并将其挂载到相应目录

在初始化安装MYSQL时,报如下错误:[root@ora10g mysql]# scripts/mysql_install_db –user=mysqlInstalling MySQL system tables…ERROR: 3 Error writing file ‘./mysql/db.frm’ (Errcode: 28)101209 4:52:38 [ERROR] Aborting

101209 4:52:38 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed! Examine the logs in/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

shell> ./bin/mysqld –skip-grant &

and use the command line tool ./bin/mysqlto connect to the mysql database and look at the grant tables:

shell> ./bin/mysql -u root mysql mysql> show tables

Try ‘mysqld –help’ if you have problems with paths. Using –loggives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section’Problems running mysql_install_db’, and the manual section thatdescribes problems on your OS. Another information source are theMySQL email archives available at

Please check all of the above before mailing us! And remember, ifyou do mail us, you MUST use the ./bin/mysqlbug script!去网上一查,发现原来是空间不够导致,去确认下:[root@ora10g mysql]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda1 3.8G 3.8G 0 100% //dev/sda3 6.0G 4.4G 1.4G 77% /u01/dev/sdb1 4.0G 3.4G 354M 91% /u02tmpfs 401M 0 401M 0% /dev/shm

果然,/usr对应的挂载点/空间已经全部耗尽。为了解决 这个问题,决定增加一块虚拟硬盘,然后划分好空间后将空间挂载到/usr目录下,下面是操作过程。第一步:关闭虚拟机1)确认Oracle测试库已经关闭ps -ef | grep ora_,如果没关闭,用shutdown immediate关闭数据库2)跳转到root用户,使用shutdown -h now关闭主机第二步:在虚拟机中增加一块6G的硬盘。这个步骤全图形化界面操作,,这里不作详述第三步:启动主机第四步:确认并对新磁盘进行分区操作fdisk /dev/sdc使用n选项和w选项创建分区,并将分区信息写入MBR中第五步:对分区进行格式化shell>mkfs.ext3 /dev/sdc1第六步:将新格式化的数据挂载到一个目录下mount /dev/sdc1 /mnt/usr第七步:将/usr目录下的所有文件复制到/mnt/usr下shell>cp /usr/* /mnt/usr/复制完后确认文件复制第八步:rm掉/usr目录下的所有对象shell>cd /usrshell>rm -rf *第九步:umount设备/dev/sdc1shell>umount /dev/sdc1第十步:将/dev/sdc1挂载到/usr目录下mount /dev/sdc1 /usr第十一步:修改文件/etc/fstab,添加如下内容:/dev/sdc1 /usr ext3 defaults 3 1

第十二步:测试安装是否能成功完成[root@ora10g usr]# cd /usr/local/mysql[root@ora10g mysql]# scripts/mysql_install_db –user=mysqlInstalling MySQL system tables…OKFilling help tables…OK

To start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password ‘new-password’./bin/mysqladmin -u root -h ora10g password ‘new-password’

Alternatively you can run:./bin/mysql_secure_installation

which will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.plcd ./mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

OK!

而其实你还爱着他,你一点也不好。

在VMware下增加空间并将其挂载到相应目录

相关文章:

你感兴趣的文章:

标签云: