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

Channels


#mysql

23 October 2007


Total 29 pages. You are browsing page 1/29.

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

--- Log opened Tue Oct 23 00:00:11 2007
--- Day changed Tue Oct 23 2007
00:00 <****> i have a table holding primary data (PK leadID) and a table holding data associated with said table. table 2 could have 10 different records for one leadID. If I 'inner join table1 on table2 using(leadID)', will it always inner join on the very last entry on table2?
00:00 <****> assuming table2's PK is called 'id', is auto-increment
00:01 <****> or do I have to somehow write a statement to ensure it'll always inner join with the record where ID is the highest..
00:02 <****> seekwill: thanks ill go google it
00:02 <****> i think my lecturers implemented that with rules/triggers in postgres
00:05 <****> rly?
00:05 <****> BobSapp eh
00:05 <****> As in the huge k1 guy who keeps on getting beaten up?
00:06 <****> yeah as in that guy
00:06 <****> 10th DAN NFL style.
00:06 <****> I know I can't get a exact answer this this but wondering if someone might be able to say it's going to take a week or 5 minutes. I have a 2ghz machine with a few gigs of ram as a dedicated mysql server. I need to run a update that is going to have to go through an estimated 486,720 columns to replace data. Or is there another method i should use to do a update of that size?
00:07 <****> it shouldnt take long at all I had something like 600,000 columns it took about 5 mins to update that
00:08 <****> depends on the complexity of the clause tbh (assuming there is one)
00:10 <****> gregf : can you paste the update statement?
00:10 <****> has to go through a bunch of posts looking for a url and changing it to a new location. A bunch of people started hardcoding some urls into the database and just mucked up a url change.
00:10 <****> gregf : if it is more than one line put it in pastebin
00:11 <****> just one line it should be very simple let me go look at what the table name is
00:13 <****> UPDATE `ibf_posts` SET post = REPLACE(post, "http://www.domain1.com", "http://www.domain2.com" < have not verified that but that should be what i have to do. I been more worried on the length of the operation so far.
00:17 <****> Well, thanks to both of you.
00:18 <****> I'd be inclined to include a where clause so only those with domain1 are picked up...
00:18 * gregf nods
00:19 <****> will do
00:19 <****> going to make a fresh backup first anyhow
00:23 <****> Does MYSQL Support the WITH block?
00:24 <****> or nested queries?
00:36 <****> ReAn: No.
00:36 <****> ReAn: Just derived tables and typical subqueries.
00:36 <****> k, thx
00:37 <****>_<
00:38 <****> they teach oracle and db2 here
00:38 <****> How can I login from command line to MySQL using my password?
00:38 <****> monie: add -p to the commandline
00:38 <****> it'll ask for it
00:38 <****> if i remember correctly
00:39 <****> althought you specify the user in the commandline
00:41 <****> unless your username matches what's set up in mysql
00:42 <****>
00:42 <****> it should be listed in the --help option
00:42 <****> try mysql --help and look for it
00:43 <****> How can I fetch the autoincrement value of the last insert?
00:44 <****> think I found it..
00:47 <****> cool
00:49 <****> BobSapp: Query OK, 756 rows affected (41.02 sec)
00:49 <****> Rows matched: 486727 Changed: 756 Warnings: 0
00:49 <****> :)
00:49 <****> lot faster than i had thought, less actually needed to be changed in there than i had though too but thanks
00:50 <****> How do I create the tables? My first time using the mysql via commandline.
00:52 <****> Monie, mysql.com/create
00:52 <****> I mean via commandline.
00:53 <****> yes, via commandline
00:53 <****> kk
00:55 <****> Monie: a quick tip: if you are using the mysql command line, do: HELP CREATE TABLE
00:58 <****> i have added a user to mysql that only has select, update, insert, and delete access to database A; however, when i log in with it, somehow the user has access to other dbs as well; how is that possible?
00:58 <****> gvcoman: show grants for the user in questionm
01:03 <****> chadmaynard: i'm sorry?
01:03 <****> gvcoman: log in as that user and issue "SHOW GRANTS;" and pastebin the output
01:07 <****> chadmaynard: http://pastebin.com/d130c16d4
01:08 <****> gvcoman: so that user can see the databases but can't do anything with them
01:09 <****> hi all. i'm on ubuntu, trying to get mysql to restart. i issue "/etc/init.d/mysql restart" but i get "Starting MySQL database server mysqld [fail]"
01:09 <****> how do i get a verbose output... any debuggging ideas?
01:10 <****> hmm
01:10 <****> chadmaynard: actually, he has at least select and update
01:10 <****> insert and delete as well
01:11 <****> to other databases than the one i gave him access to
01:11 <****> How can I see what's my tables name in command line?
01:11 <****> show tables;
01:11 <****> spg2007, try "sudo /etc/init.d/mysql restart"
01:11 <****> show tables;
01:11 <****> ERROR 1046 (3D000): No database selected
01:11 <****> doh! good call... i was missing sudo
01:12 <****> use $database;
01:12 <****> thx gnari
01:12 <****> use foo; show tables;
01:12 <****> Tables_in_monie
01:13 <****> so monie is the database name?
01:13 <****> Database changed
01:13 <****> +-----------------+
01:13 <****> | Tables_in_monie |
01:14 <****> Monie: don't paste in here.
01:15 <****> k
01:15 <****> Is there a way to view how many rows the table has?
01:15 <****> select count(*) from table
01:15 <****> no sleep... caffiene... pizza... code...
01:16 <****> Monie, why dont you just read on mysql basics instead of asking seriously rtfm issues?
01:20 <****> it seems that there are two dbs that can be edited by any user
01:20 <****> how has that setting been assigned?
01:20 <****> and how can i take it off?
01:20 <****> you mean "test"?
01:21 <****> ?
01:21 <****> i added a user without any rights to anything
01:21 <****> and when i log in with it, i have access to two dbs
01:21 <****> which dbs?
01:22 <****> dbs you created or system dbs?
01:22 <****> one i created
01:22 <****> and one is information_schema
01:23 <****> http://www-css.fnal.gov/dsg/external/freeware/mysqlAdmin.html
01:23 <****> i do not understand how the user has access to those dbs
01:23 <****> write access too


Total 29 pages. You are browsing page 1/29.

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo