LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1396|回复: 2

用horde做webmail时mysql出错,帮我发在论坛上吧,谢谢!

[复制链接]
发表于 2003-1-15 20:38:40 | 显示全部楼层 |阅读模式
我用horde做webmail时出错,我对php和mysql不熟悉,你帮我发表在论坛上找大侠帮我解决一下吧,谢谢了!我是chinaunix论坛上的arbor。
  系统:RH8.0 sendmail 8.12,php 4.2.2,mysql 3.23.52-3,apache 2.0,后面的软件都是REDHAT自带的rpm包,准备用horde+imp做webmail,可是问题在mysql这里出现了,我对mysql和php不熟悉,注意问题如下:
[root@mail local]# mysql -p < /var/www/html/horde/scripts/db/mysql_create.sql
Enter password:
ERROR 1044 at line 16: Access denied for user: 'root@localhost' to database 'mysql'
[root@mail local]#

mysql_create.sql文件内容如下:

# $Horde: horde/scripts/db/mysql_create.sql,v 1.1.2.6 2002/05/31 09:22:15 jan Exp $
#
# If you are installing Horde for the first time, you can simply
# direct this file to mysql as STDIN:
#
# $ mysql --user=root --password=<MySQL-root-password> < mysql_create.sql
#
# If you are upgrading from a previous version, you will need to comment
# out the the user creation steps below, as well as the schemas for any
# tables that already exist.
#
# If you are upgrading from Horde 1.x, the Horde tables you have from
# that version are no longer used; you may wish to either delete those
# tables or simply recreate the database anew.

CONNECT mysql;

REPLACE INTO user (host, user, password)
    VALUES (
        'localhost',
        'horde',
  -- IMPORTANT: Change this password!
        password('××××××')
    );

REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
                 delete_priv, create_priv, drop_priv)
    VALUES (
        'localhost',
        'horde',
        'horde',
        'Y', 'Y', 'Y', 'Y',
        'Y', 'Y'
    );

FLUSH PRIVILEGES;

# MySQL 3.23.x appears to have "CREATE DATABASE IF NOT EXISTS" and
# "CREATE TABLE IF NOT EXISTS" which would be a nice way to handle
# reinstalls gracefully (someday).  For now, use mysql_drop.sql first
# to avoid CREATE errors.

CREATE DATABASE horde;

CONNECT horde;

CREATE TABLE horde_users (
    user_uid       varchar(255) not null,
    user_pass      varchar(32) not null,
    primary key (user_uid)
);

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users TO horde@localhost;

CREATE TABLE horde_prefs (
    pref_uid        char(255) not null,
    pref_scope      char(16) not null default '',
    pref_name       char(32) not null,
    pref_value      text null,
    primary key (pref_uid, pref_scope, pref_name)
);

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_prefs TO horde@localhost;

CREATE TABLE horde_categories (
       category_id INT not null,
       group_uid VARCHAR(255) not null,
       user_uid VARCHAR(255),
       category_name VARCHAR(255) not null,
       category_data TEXT null,
       category_serialized SMALLINT DEFAULT 0 not null,
       category_updated TIMESTAMP,
       PRIMARY KEY (category_id)
);

CREATE INDEX category_category_name_idx ON horde_categories (category_name);
CREATE INDEX category_group_idx ON horde_categories (group_uid);
CREATE INDEX category_user_idx ON horde_categories (user_uid);
CREATE INDEX category_serialized_idx ON horde_categories (category_serialized);

CREATE TABLE horde_categories_categories (
       category_id_parent INT not null,
       category_id_child INT not null,
       PRIMARY KEY (category_id_parent, category_id_child)
);

GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories TO horde@localhost;
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories_categories TO horde@localhost;

FLUSH PRIVILEGES;

# Done!
发表于 2003-1-16 22:06:10 | 显示全部楼层
估计你得先赋权限给你的root???
装个phpmyadmin先?
 楼主| 发表于 2003-1-17 09:08:23 | 显示全部楼层

好象默认的mysql数据库(这个库,不是这个软件)里面有两个host

好象默认的mysql数据库(这个库,不是这个软件)里面有两个host,一个是localhost,一个是我的邮件服务器的域名,我能否删除我的域名,以为我拿这个做试验的,不是真正的域名,以后也是要改的,用localhost应该可以吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表