Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

13 October 2007


Total 15 pages. You are browsing page 3/15.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

01:55 <****> so for avoiding duplicate content on that field on several rows?
01:55 <****> I know that... that one of the few things I know of databases
01:56 <****> and what happens if the record is not unique?
01:56 <****> it's not indexable?
01:56 <****> a primary key is always indexed
01:56 <****> at least on mysql
01:56 <****> you don't have to index it yourself
01:56 <****> you mean a primary key *IS* an index
01:56 <****> so is autoindexesd a primary key? when you define it... it's automatically autoindexed?
01:56 <****> is the record is not unique, then you don't have any way to identify the record alone
01:57 <****> for indexing?
01:57 <****> because else
01:57 <****> for your design
01:57 <****> why do you want a record to be unique?
01:58 <****> for consistency purposes
01:58 <****> it's more a question of design
01:58 <****> a good design helps having good performances, simpler queries, and so on...
02:00 <****> perhaps I say a odd thing or something like that but... an index is like in a book a way for obtaining where the information you want to see is whithout reading the whole table? am I wrong? and well in databases the search will be perhaps in bite 20 you have this and in 30 this .... am I wrong?
02:00 <****> byte sorry :)
02:01 <****> a index modifies the lookup complexity from O(n) to O(log n) basically
02:01 <****> an*
02:01 * chadmaynard views a gross simplification
02:01 <****> well I'm not a database teacher
02:02 <****> but that's the basic idea behind indexes
02:02 <****> although it mostly depend on the implementation
02:02 <****> if its a b-tree,yes
02:02 <****> we are in mysql, so indexes are implemented as b-trees in mysql if I'm not wrong :)
02:03 <****> b-tree indexes are, yes
02:03 <****> annyone have an idea why my db keeps corrupting?
02:03 <****> i have to backup and reinserv evrytime
02:03 <****> reinstall*
02:04 <****> if i dont do it mysql keeps craching with text mysql has gone away etc...
02:06 <****> I am getting this error when my web page tries to use the mysql connect function: mysql_connect() [function.mysql-connect]: Access denied for user 'php'@'localhost' (using password: YES) in .. Can anyone explain why?
02:07 <****> I am assuing it has to do with the user php's rights but im not sure what to change exactly..
02:07 <****> because access denied
02:07 <****> jbalint: hehe
02:07 <****> Cahaan, lol and how could you understand that concretelly it records octect number of position of the file in wich data is stored or something like that?
02:09 <****> and what's the difference between a primary key and simple key?
02:10 <****> I'll let the #mysql big boys answer you with rich and depth details, cheers
02:11 <****> thanks a lot Cahaan :)
02:17 <****> Biolante: how can i give the php access?
02:18 <****> there is no "php access"
02:18 <****> there is "user access"
02:18 <****> php uses same protocol as all other clients
02:18 <****> Biolante: how to I give this specific user access?
02:19 <****> should i copypaste manual?
02:19 <****> Biolante: no but , im not sure which user privialge this user needs.
02:20 <****> Electrosys: show grants for 'php'@'localhost';
02:20 <****> permissions for neede database
02:20 <****> *needed
02:20 <****> btw is this local or remote connection?
02:21 <****> Biolante: 'php'@'localhost' ?
02:21 <****> this is how he trying to connect
02:21 <****> I dont think there are any grants.
02:21 <****> and a server is replying!
02:21 <****> only privilages.
02:21 <****> Electrosys: did it say no user matched?
02:21 <****> erm... mkay, me dumb :)
02:22 <****> what's the main difference with primary keys and keys?
02:22 <****> chadmaynard: no it says : There is no such grant defined for user 'php' on host 'localhost'
02:23 <****> Electrosys: right. Now you need to decide what privileges you want this user to have
02:23 <****> chadmaynard: well i have decided on privilages. -- select, insert, update delete...
02:24 <****> chadmaynard: that is set already..
02:25 <****> Electrosys: then GRANT select, insert, update, delete ON database.* TO 'php'@'localhost' IDENTIFIED BY 'password';
02:25 <****> could anyone tell me please?
02:26 <****> Ramattack: didn't someone tell you already?
02:26 <****> no sorry, only the explanation of primary keys and indexes...
02:27 <****> but not the otehr
02:27 <****> keys ARE indexes
02:27 <****> or I can't see it... sorry
02:27 <****> could someone help me? i want to set up a website that works with sms.
02:28 <****> so then what's the difference between specifying an index at the end of the query and setting key on table definition?
02:29 <****> I don't understand what specially have keys in difference with primary keys and indexes...
02:30 <****> keys = indexes. ie boat = ship. PK is an attribute that can identify one single row out of all of the others.
02:30 <****> possible to make the ID integer to a non-negative variable so it can store double as much?
02:31 <****> so if the same to set a PK and a index at the end of the query to the database (select, update...) and to set a PK or a key in the table definition??
02:31 <****> is sorry
02:31 <****> to make a unsigned integer :)
02:32 <****> thats to me?
02:32 <****> Ramattack: I'm not sure how you specify index in a query.
02:32 <****> acomaco: ( name int unsigned );
02:32 <****> index on as Cahaan mate explained
02:32 <****> index on for the WHERE clause fields
02:32 <****> chadmaynard: I have already created a user for php files to use. and it already has a Y on the privilages in need, but for some reason i sill get that error.
02:33 <****> Electrosys: then you did it wrong. Try flush privileges; if it doesn't work make another user
02:34 <****> chadmaynard: thanks that did it.
02:36 <****> chadmaynard, have I explained how I do indexes?
02:36 <****> Ramattack: no
02:37 <****> select city from peoples where name=andrew index on (name)
02:38 <****> Ramattack: that doesn't create an index
02:39 <****> Ramattack: the "index on (name)" isn't part of the SQL
02:39 <****> and how could I create an index then? Cahaan told me could be created as this or unless I have understand that...
02:40 <****> Ramattack: I think you misunderstood. It has to be part of the table schema (definition)
02:42 <****> I see...
02:43 <****> why mysql calls in different way to indexes? because if primary keys and keys are the same and are indexes why are called different ways?
02:43 <****> Ramattack: Primary key is a type of key. Just like car is a type of vehicle
02:44 <****> but you can specify in table schema only key instead of primary key
02:45 <****> Ramattack: what language do you speak?
02:45 <****> spanish
02:45 <****> lol but way?


Total 15 pages. You are browsing page 3/15.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo