Hello list,
I'm new to MySql, and have MySQL 4.0.18 installed on my Linux-box.
I have created a new database (sample_db)with
"mysqladmin -p create sample_db"
After that I wanted to add the corresponding values for
that database and its user into the mysql database.
So I typed
mysql> use mysql;
The host-tablestructure looks like this:
(hosttable privileges):
FIELD TYPE ATTRIBUTES
----------------------------------------------
Host char(60) Binary
Db char(64) Binary
Select_priv enum('N','Y')
Insert_priv enum('N','Y')
Update_priv enum('N','Y')
Delete_priv enum('N','Y')
Create_priv enum('N','Y')
Drop_priv enum('N','Y')
Grant_priv enum('N','Y')
References_priv enum('N','Y')
Index_priv enum('N','Y')
Alter_priv enum('N','Y')
Create_tmp_table_priv enum('N','Y')
Lock_tables_priv enum('N','Y')
Then I typed:
insert into host values('localhost','sample_db','Y','Y','Y','Y','Y'
,'Y','Y','Y','Y','Y','Y','Y');
and got the response:
ERROR 1062: Duplicate entry 'localhost-sample_db' for key 1
Like I said, i'm new to MySQL and can't figure out what is wrong with the insert-instruction.
Any help to show me what's wrong here is apreciated.
Thanks in advance,
Fred
I'm new to MySql, and have MySQL 4.0.18 installed on my Linux-box.
I have created a new database (sample_db)with
"mysqladmin -p create sample_db"
After that I wanted to add the corresponding values for
that database and its user into the mysql database.
So I typed
mysql> use mysql;
The host-tablestructure looks like this:
(hosttable privileges):
FIELD TYPE ATTRIBUTES
----------------------------------------------
Host char(60) Binary
Db char(64) Binary
Select_priv enum('N','Y')
Insert_priv enum('N','Y')
Update_priv enum('N','Y')
Delete_priv enum('N','Y')
Create_priv enum('N','Y')
Drop_priv enum('N','Y')
Grant_priv enum('N','Y')
References_priv enum('N','Y')
Index_priv enum('N','Y')
Alter_priv enum('N','Y')
Create_tmp_table_priv enum('N','Y')
Lock_tables_priv enum('N','Y')
Then I typed:
insert into host values('localhost','sample_db','Y','Y','Y','Y','Y'
,'Y','Y','Y','Y','Y','Y','Y');
and got the response:
ERROR 1062: Duplicate entry 'localhost-sample_db' for key 1
Like I said, i'm new to MySQL and can't figure out what is wrong with the insert-instruction.
Any help to show me what's wrong here is apreciated.
Thanks in advance,
Fred