最近在试用阿里云,但是遇到了一些问题。
我在安装数据库的时候,是通过apt-get install mysql-server进行安装的,然而我安装完后,想将数据存储到额外挂载的磁盘时,却发现数据不能写入。。。
因为我老是启动失败。。所以看了下LOG,LOG是说写入目录失败。
于是请vampire帮忙看了一下,他测试了mysql_install_db,但是。。。

# mysql_install_db --datadir=/server/software/mysql_data
Installing MySQL system tables...
130308 16:14:25 [Warning] Can't create test file /server/software/mysql_data/AY130304113437124704.lower-test
130308 16:14:25 [Warning] Can't create test file /server/software/mysql_data/AY130304113437124704.lower-test
ERROR: 1005 Can't create table 'db' (errno: 13)
130308 16:14:25 [ERROR] Aborting

130308 16:14:25 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed! Examine the logs in
/server/software/mysql_data for more information.

You can try to start the mysqld daemon with:

shell> /usr/sbin/mysqld --skip-grant &

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

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

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /server/software/mysql_data that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/scripts/mysqlbug script!

oh shit,还是安装不了。试了很多都没有用。最后从官方下载了5.6的包进行安装。居然就OK了。我靠,这个源是cn.ubuntu的源啊。。。苦逼了。
所幸问题解决了。

多谢vampire,同时各位朋友也注意下。如果真的不行,也可以尝试从网上直接下载源码编译,要么。就换成中科大的源,然后再upgrade。中科大的更新比较快。

但因为要修改内容和启动参数还是有点危险的。。。