Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th December 2008, 16:19
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 8th December 2008, 11:19
geek.de.nz geek.de.nz is offline
Member
 
Join Date: Feb 2006
Posts: 65
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to geek.de.nz Send a message via MSN to geek.de.nz
Cool 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');
__________________
Always mention at least your distribution/version! You can add it in your signature if you don't want to always type it. ;-)

Distributions:
Ubuntu 5.10 with custom kernel (2.6.16-suspend2),
Debian Sarge 3.1 and Etch

Please submit your ISP or Webhost to (free)
http://www.ihostnz.com
Reply With Quote
  #3  
Old 8th December 2008, 15:27
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by geek.de.nz View Post
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
Reply With Quote
  #4  
Old 10th December 2008, 01:35
marpada marpada is offline
Senior Member
 
Join Date: Sep 2008
Posts: 139
Thanks: 2
Thanked 14 Times in 14 Posts
Default

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

Last edited by marpada; 13th May 2011 at 02:58.
Reply With Quote
  #5  
Old 10th December 2008, 04:34
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by marpada View Post
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
Reply With Quote
  #6  
Old 11th December 2008, 23:57
marpada marpada is offline
Senior Member
 
Join Date: Sep 2008
Posts: 139
Thanks: 2
Thanked 14 Times in 14 Posts
Default

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

Last edited by marpada; 13th May 2011 at 02:58.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing MySQL on suse 10.3 Txchaser Installation/Configuration 20 18th April 2008 02:05
Problem Installing Apache 2.2.8, MySQL 5.0 Client and PHP 5.2.5 On Fedora 8 (64-Bit) asyadiqin Installation/Configuration 5 10th April 2008 19:40
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 18:03
Site with MySQL problem?! edge Server Operation 2 13th August 2006 20:57
Problem installing ISPConfig, then with MySQL... ctroyp Installation/Configuration 7 26th September 2005 17:37


All times are GMT +2. The time now is 22:43.


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