| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> >5.0 it does <0> >=5.0 it does <1> hmm. me=v4... <1> can not upgrade <2> what is the command to delete or drop all tables in a database? <3> a <1> a_staff: drop databse x; create database x <4> drop database db; <2> i cant drop database... bcoz i only got privileges for add data in a database or a table <1> well you cant do it as that user then <2> i already add tables... but i cant delete all tables in one command <1> you will need to log in as a ,ore privileged user <3> a_staff, you can use show tables output and p*** it to a script <2> but i can delete one by one... <3> I wonder how does show tables gets its output... that way you could write a query <2> i want to delete all tables....
<0> a_staff: as Yango said, application layer <1> shabbs: I know triggers... but whats a SP? <0> a_staff: or if you have >=5.0 you can query information_schema for all the tables in the database and use that instead of trying to parse show tables <3> tkp, stored procedure <1> a k <0> tkp: stored procedure, also >=5.0 <1> yep :( <2> the problem is the tables (all tables) are using identical name.. and not just 1 or 2 <3> a_staff, ??????? <1> can you have more than one table with the same name??? <3> a_staff, how could you create all tables with the same name? <2> show it will be wasting time to delete one by one <2> i use a cms... install.php <5> how can i show a history of typed commands for mysql? <0> a_staff: you can't have 2 tables with the same name in 1 database <3> a_staff, well, anyhow and whatever you mean be that, there is no other option than to either drop the db or parse show tables output <3> by* <2> Yango, how to parse? <2> shabbs i mean not the same name but like... net_1 net_2 net_3 <2> n so onm <0> a_staff: then write a script that loops through net_$i and deletes 'em <2> k <2> thnks <5> command history: see .mysql_history <6> a_staff: use phpmyadmin <7> Hey all. Is there a way to return the unique row id generated with an insert on an auto_increment row? (PHP is the laguage I'm using). <8> how can i change the p***word of a mysql user? <9> ceeto: mysqli_last_insert_id() <7> Thanks!!! :) <0> !m hawking set p***word <10> hawking: (SET P***WORD Syntax) : http://dev.mysql.com/doc/mysql/en/SET_P***WORD.html <9> or select last_insert_id() <9> or whatever that function is called again <0> yeah, last_insert_id() <11> hello all <7> That worked great. Thanks! My next question, is there a way to update the first number that the auto_increment feature uses? Maybe start it at 1000 or something? <11> with LIMIT 10 I get the frist 10 rows, what about if I want to get the last 10? <7> antirez ORDER by XXX DESC LIMIT 10 <0> ceeto: SET AUTO_INCREMENT = 1000; should work <11> isn't this going to be very slow? <7> Thanks, shabbs. <0> !man using auto_increment <10> (Using AUTO_INCREMENT) : http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html <11> my real problem is that I've an auto-increment ID and I want to know what's the MAX ID <0> ceeto: I was wrong: ALTER TABLE tbl AUTO_INCREMENT = 1000; <7> :) Thanks again. <0> antirez: select max(id) from tbl; <9> and getting the last 10 is easy .. just put in an order by with reverse ordering <8> shabbs: thanks <11> shabbs, cool ;) <11> thanks <9> and remember .. getting the max id is not going to necessarily tell you the offset to use for the last 10 <9> since there might be id's unused in the middle <9> after a delete for example <11> lsmith, yes ok <11> in my application rows of this table are never deleted <1> when making entity relationship diagrams, there is often the option to specify a relationship as '0 or 1' <1> can this actually be enforces in the schema? <1> enforced* <12> So... I could use ORDER BY FIELD( column, 'a', 'b', 'c', column) so I can prioritize certain words.. but how can I make a certain string last? ORDER BY FIELD( column, 'a', 'b', column, 'c' ) If I wanted to put 'c' last in the result set?
<13> hi <13> question: I am root on a linux machine and I forgot the USER-P***word of a MySQL User who I added with GRANT ... <13> can I give the user a new p***word anyhow? <14> search mysql.com for "reset root p***word" <14> it gives instructions <13> RedACE, not root p***word <13> I know the root p***word <14> oh <13> RedACE, I forgot the user p***word <12> !m Celeste set p***word <10> Celeste: (SET P***WORD Syntax) : http://dev.mysql.com/doc/mysql/en/SET_P***WORD.html <13> thank you will <15> How can I copy databaseA's structure+data to databaseB? <12> !m sean mysqldump <10> sean: (The mysqldump Database Backup Program) : http://dev.mysql.com/doc/mysql/en/mysqldump.html <16> someone here who know why i get errors when i replace LIMIT 0,10 for LIMIT '$Start','$End' ? <17> don't quote the values ? <9> ^Willie^: always dump sql out when you are getting syntax errors <9> and then run the dumped sql inside the mysql cli <16> TodoInTX: same error <16> yes i go switch some debug on now <18> Hello folks.. <18> My box has been running mysql with 99.9% CPU used up with 1.2% load avreage for the last 5 hours. Is it possible to view what queries are running on it when I login to the prompt through cli? <12> !m Haris slow query log <10> Haris: (The Slow Query Log) : http://dev.mysql.com/doc/mysql/en/Slow_query_log.html <12> !m Haris show processlist <10> Haris: (SHOW PROCESSLIST Syntax) : http://dev.mysql.com/doc/mysql/en/SHOW_PROCESSLIST.html <16> hmmzz typo i think <8> how can i view the table list of a database? <19> like 'show tables'? <16> lsmith: it whas an mis typo <16> there stand $start must be $Start <9> not suprised :-) <16> go watch some tv afther 8 hours nonstop scripting <16> make google in one day :p <15> ^Willie^; I can :P <19> There seems to be no way to get an environment variables values from inside a mysql script. <19> Or even run a sub-process...? <9> !m anderock show variables <10> anderock: (SHOW VARIABLES Syntax) : http://dev.mysql.com/doc/mysql/en/SHOW_VARIABLES.html <19> Yeah, except I am talking some arbitrary environment variable, say like OSTYPE or something... <12> Yeah... so... ORDER BY FIELDS( col, ''. col ) DESC, syntax error on DESC? <12> How do you do a reverse order? <20> For those that make backups by taking a snapshot and then backing up binlogs: How often do you take a snapshot? <14> snapshot? <12> oh lmfao <20> redace: A copy of the database from which you would begin to replay your binlogs to do a restore. <20> But I don't think you're backing up that way :) <0> mendel: I would think weekly is avg, but nightly is certainly not unheard of <20> thanks <20> yeah, i'm mostly looking for a rule of thumb <21> RBR keeps corrupting a table on my slave, grrr <21> source table is correct, slave table is ok, turn on slave ... slave gets marked in show status as crashed but the table works, any check fails after that.. endless cycle :( <22> hey shabbs :) <22> Darien, where's CPUnerd? :\ <23> brasil or new york or something <0> sup Daveman <22> Darien o.O <0> they have computers in brasil? <24> where is brasil? <0> as much 'down under' as australia <25> only if you live in the Ivory Coast <22> haha <0> why do gas prices go up when the price of oil goes down? <26> why do audio cds cost the same now as they in in 1994? <26> why is it cheaper to buy a special edition extended directors cut 4 dvd set of a movie, then it does to buy the sound track? <6> frb: allofmp3.com <26> myc: what's the catch? <6> frb: its legal in russia <0> haha <6> frb: they dont pay licensing fees in russia <6> so tis $1per mb or something <6> flat rate for sixze <0> sounds like a steal
Return to
#mysql or Go to some related
logs:
suse100.i686 iso kfrb autostart #perl Gnome thumbnails thumbs.db #bash undefined symbol: __libc_csu_init opengl +linux +windows hlp files
thinkpad caplock problem iptables-save -t broken chuck moore asshole
|
|