HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Problem on editing data on MySQL table (http://www.howtoforge.com/forums/showthread.php?t=29310)

satimis 7th December 2008 15:19

Problem on editing data on MySQL table
 
Hi folks,


I have a table tblPerdition created on dbPerdition

Code:

mysql> SHOW tables;
+-----------------------+
| Tables_in_dbPerdition |
+-----------------------+
| tblPerdition          |
+-----------------------+
1 row in set (0.00 sec)


Code:

mysql> DESCRIBE tblPerdition;
+------------+--------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| user      | varchar(128) | NO  | PRI |        |      |
| servername | varchar(255) | NO  |    |        |      |
| port      | varchar(8)  | YES  |    | NULL    |      |
+------------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)


On editing data on the table;

Code:

mysql> INSERT INTO user VALUES
    -> ('userA@domainA.com'),
    -> ('userA@domianB.com'),
    -> ('userA@domainC.com');
ERROR 1146 (42S02): Table 'dbPerdition.user' doesn't exist


Please advise how to fix the problem? Whether I need to edit;
Code:

('userA'@'domainA.com')
???


TIA


B.R.
satimis

geek.de.nz 8th December 2008 10:19

your table seems to suggest
 
Quote:

Code:

mysql> DESCRIBE tblPerdition;
+------------+--------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| user      | varchar(128) | NO  | PRI |        |      |
| servername | varchar(255) | NO  |    |        |      |
| port      | varchar(8)  | YES  |    | NULL    |      |
+------------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)


Code:

mysql> use dbPerdition;
    ->INSERT INTO tblPerdition (user, servername) VALUES
    -> ('userA','domainA.com'),
    -> ('userA','domianB.com'),
    -> ('userA','domainC.com');


satimis 8th December 2008 14:27

Quote:

Originally Posted by geek.de.nz (Post 158842)
Code:

mysql> use dbPerdition;
    ->INSERT INTO tblPerdition (user, servername) VALUES
    -> ('userA','domainA.com'),
    -> ('userA','domianB.com'),
    -> ('userA','domainC.com');


Hi geek.de.nz,


Thanks for your advice.

Ran;


Code:

mysql> INSERT INTO tblPerdition (user, servername) VALUES
    -> ('satimis','satimis.com'),
    -> ('satimis','satimis.changeip.net'),
    -> ('satimis','satimis.dnsalias.com');

ERROR 1062 (23000): Duplicate entry 'satimis' for key 1


B.R.
satimis

marpada 10th December 2008 00:35

user field is primary key, so you can't have duplicate values. Maybe you created the primary key wrong.
________
VAPORBROTHERS
________
THREESOME MOVIES

satimis 10th December 2008 03:34

Quote:

Originally Posted by marpada (Post 159097)
user field is primary key, so you can't have duplicate values. Maybe you created the primary key wrong.

I was following this document;
http://www.vergenet.net/linux/perdit...tiondb.5.shtml

to config/setup perdition creating a MySQL table. The primary key is required there. Their mailing list can't help me out. I'm looking around for a solution.

Besides, the descriptor of Null is either YES or NO. It needs blank there.


satimis

marpada 11th December 2008 22:57

Quote:

Perdition supports a dynamic library mechanism to access arbitrary databases that resolve a user to a host and port.
Quote:

The user field must also be a unique index as an exact match will be made of this field from the username supplied by the user.
If a user must be resolved to a host and a port is doesn't make sense that you try to add duplicate users, does it?
________
Ipad guide
________
big women Cam

satimis 12th December 2008 00:52

Quote:

Originally Posted by marpada (Post 159421)
If a user must be resolved to a host and a port is doesn't make sense that you try to add duplicate users, does it?

Same user holding several email address must be allowed which is not considered as duplicate user (on MySQL table maybe). Actually the setup on 2 key components are critical, the config file of perdition and the table of the database, 'tblPerdition'.

The whole system is now working perfectly on Intranet. Incoming mails are routed by the routing mail server to their mail servers running as guests on the Xen box. Mail clients running on workstations on the Intranet can send and receive mails via their own mail server. If allotting each mail server a port my problem may be solved already. But this is NOT the goal of my test. Not many perdition document/link can be found on googling. If I can't solve my problem with Perdition I'll move to nginx.


B.R.
satimis


All times are GMT +2. The time now is 01:08.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.