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

Channels


#mysql

14 November 2007


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

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

--- Log opened Wed Nov 14 00:00:53 2007
00:01 <****> this was it.. UPDATE imagetable SET thumbname = CONCAT(REPLACE(imagename, '.jpg', ''), '_thumb', '.jpg');
00:04 <****> why the ,'jpg' at the end ? it's just one string, you know...
00:05 <****> ,'_thumb.jpg')
00:05 <****> try that :)
00:08 <****> hello folks
00:09 <****> I need a query that pulls IDs from one table and uses these ids to load other ids in another table
00:10 <****> this is simple with multiple queries but I'd like to do it all in one
00:10 <****> something like
00:11 <****> select ID_second from second_table where ID_first in (select ID_first from first_table where `date`='2007-12-11')
00:14 <****> nevermind, this query actually works
00:15 <****> woot
00:15 <****> you're not inserting anything, you know
00:15 <****> abusing sql ++
00:33 <****> Is it possible to use mysqldump to export data from one database directly into another?
00:34 <****> not without the assistence of the one ring
00:35 <****> well
00:35 <****> there are also pipes
00:35 <****> which are kind of ring shaped
00:35 <****> I don't understand?... can I do something like mysqldump | mysql ?
00:35 <****> of course
00:36 <****> My problem is my databases are both running innodb and are both 100gig plus... dumping to a file is difficult...
00:36 <****> i dont know, i just saw a comedic opening and took it
00:37 <****> I was considering setting up replication... but I wasn't sure what would happen once the master disappears
00:37 <****> Then I thought... hey... maybe I can just export/import on the fly?
00:38 <****> adaptr: did you mean me? I don't get it?
00:41 <****> Can anyone comment on what I'm doing?
00:41 <****> Offer any suggestions or thoughts?
00:42 <****> -C 4tw
00:44 <****> well this topic has been widely discussed
00:44 <****> kritical: yes, you can do exactly like how you say... mysqldump [options] | mysql [-h otherhost]
00:45 <****> kritical: you can also tell mysqldump to print out a "CHANGE MASTER TO..." command that configures the slave to the correct binlog position on the master which you took the backup from.
00:46 <****> kritical: something that big you will want to use --single-transaction to prevent having to lock it for ages and ages.
00:47 <****> TodoInTX, hmm I hadn't considered using mysqldump and replication... then I can leave the database in production during all of this :/
00:47 <****> yeah
00:47 <****> it's just slower than copying the datafiles.
00:48 <****> My datafiles are raw...
00:48 <****> yep, it'd be pretty lame to have to come out of production to take a consistent backup.
00:48 <****> This isn't for backup... I'm moving the database to a new server
00:48 <****> same thing...
00:48 <****> yep
00:50 <****> it's pretty useful, you can have it replicate and change your apps so no downtime
00:50 <****> when you're ready to change over to the new machine, you just cut off all changes to the master, reconfigure the app to look at the new machine and you're away.
00:51 <****> nils_... well maybe a minute or two.
00:51 <****> yeah depending on the app
00:55 <****> I'm fairly new to replication so I'll need to go read up on it...
00:55 <****> Thanks for your help nils_ and TodoInTX
01:02 <****> is there a default file where the password for mysql's root is stored?
01:02 <****> i changed it via phpmyadmin and now i cant get back into phpmyadmin lol
01:02 <****> search google, theres many hits
01:03 <****> !m Maenad reset password
01:03 <****> Maenad: (How to Reset the Root Password) : http://dev.mysql.com/doc/mysql/en/resetting-permissions.html
01:04 <****> well in particular im using MAMP 1.7, i think that should make a difference, no?
01:09 <****> can a stored procedure dynamically create a SQL statement?
01:09 <****> Hi, I was wondering if someone could assist me with a replication issue.
01:09 <****> My servers were setup and working with replication.
01:10 <****> However, after a reboot, they are no longer working
01:10 <****> I get: ERROR 1201 (HY000): Could not initialize master info structure;
01:11 <****> hmmm got a question is I have one user account connected to my a db and then I try to connecto that db using the same account from a another terminal and I get " Access denied for user 'nmatrix9'@'localhost' (using password: YES) " is it essentially telling me that only one instance of a user account can connect to the db at a time?
01:12 <****> You typed the password correctly?
01:12 <****> yes
01:12 <****> You sure?
01:12 <****> I'll try again from the account that works
01:12 <****> Try without a password too.
01:13 <****> if no password works, then execute select current_user();
01:15 <****> hola
01:15 <****> hi
01:15 <****> can anyone see a problem with this stored proc? http://pastebin.com/m7a218f3
01:15 <****> specifically, i cant seem to be able to dynamically create that SQL statement
01:16 <****> kpdvx: expected to fail
01:16 <****> the error i receive is Table 'my_db.tablename' doesn't exist
01:16 <****> kpdvx: cannot pass identifier as variable
01:17 <****> kpdvx: search for dynamic sql in stored proc
01:17 <****> kimseong, k, thanks, i'll look for that
01:18 <****> Predominant, son of a gun that was it
01:18 <****> Predominant, ok ok I feel like a dumbass
01:20 <****> Predominant: do you have master_% variables defined in your my.cnf ?
01:20 <****> It was the permissions for the user I was trying to use
01:20 <****> didn't have administrative permissions on the database I guess
01:20 <****> Predominant: this is deprecated and will be ignored in the future.
01:21 <****> Predominant: IIRC they will override the settings in the master.info file.
01:21 <****> TodoInTX
01:21 <****> kimseong?
01:22 <****> TodoInTX: ? the master_* in my.cnf overwrite the master.info ?
01:22 <****> kimseong, i found this: http://forge.mysql.com/snippets/download.php?id=13 -- doesn't look like a very clean way of doing it
01:22 <****> TodoInTX: i thought the master_* in my.cnf is ignored when master.info file exist
01:24 <****> kimseong: "each is ignored if a master.info file exists when the slave starts *and* contains a value for the option."
01:25 <****> so... mostly
01:25 <****> TodoInTX: does it mean it takes the value in my.cnf if the value in master.info file is blank?
01:25 <****> yes
01:27 <****> thanks, I never know that
01:28 <****> TodoInTX: Looks like a config issue.
01:28 <****> TodoInTX: User incorrectly specified, perhaps.
01:29 <****> Does MySQL need DNS online to operate?
01:29 <****> If there was no way for MySQL to resolve names, would it work fine?
01:30 <****> if cannot resolve hostname, you have to use ip address
01:30 <****> Predominant: no, it will try to resolve hostname for connecting server to match it against the grants table. You can use --skip-name-resolve and use only IP/Network for 'host' in your grants.
01:30 <****> in the grant tables
01:30 <****> TodoInTX: I mean just for startup.
01:31 <****> Since I seem to have created circular dependencies.


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

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo