mysql 无法创建库

mysql 无法创建库



刚刚装好的Mysql5 , root 用户的密码为空. 进去,结果发现不能创建库文件.痛苦中. 请大家给点意见

[root@redhat rpm]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21 to server version: 5.0.22-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database school;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'school'
mysql> exit
Bye
[root@redhat rpm]# mysql -user=root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 5.0.22-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database school;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'school'
mysql>

      
mysql用户对datadir可写吗?      
找不到  datadir 文件
find /  -name datadir
没有      
这个是mysql的配置文件中定义的.

# cat /etc/my.cnf | grep data
datadir         = /home/ddb/mysql/var      
我的是  my.cnf
   datadir=/var/mysql;
里面的权限是    组 mysql   ;  用户: mysql ;
                        读写,改全开.