@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Comments:

<foo> I'm going to be storing stats that will record how many times a file has been downloaded. What's the best way to do this? I don't think grabbing the download number from a field and incrementing it would be the best unless that is the only way... is there a way to auto_increment when I update a field or something?
<Darien> foo: update field set foo=foo+1 ?
<foo> Darien: hmm, I didn't know that could be done. Thanks :)
<Darien> sure :)
<BigTrucK> your really not supposed to store calced values
<BigTrucK> should do a downloads table that inserts the filename and timestamp
<BigTrucK> then sum the total for that filename
<somekool> I had to move a blog from one server to another, the blog is in Japanese. I did a mysqldump on one server and push it into another database on a separate server. and I lost the encoding. I can't read the japanese on the new server. is it an option on the server ? an incompatibility ? an option on the dump ? anyone have a solution for me PLEASE ? thnaks.
<infi> somekool: you have to set the encoding at the time of population, or it may/will strip bits.
<infi> translation: your stored data is now incorrect, and you have to reload.
<somekool> infi I need this option when I'm doing the mysqldump from the source, or whaen I'm inserting the SQL ? or both ?
<infi> somekool: both
<infi> somekool: what character format are you using (utf8 I hope)
<somekool> i dont even know
<somekool> I suppose it is
<ctooley> Is there not a way to tell a running mysql daemon to start logging slow queries?
<somekool> infi, is it related with the Collation of the table ? what does it do when you change that ? or is it only a phpmyadmin settings ? (collation) ?
<somekool> what does it do to do something like that ? ALTER TABLE `articles` DEFAULT CHARACTER SET ujis COLLATE ujis_japanese_ci
<somekool> infi I really don't understand encodings
<infi> somekool: altering the tables to use ujis now won't do any good, it already stripped the bits.
<somekool> how about my original ? why can I read the japanese on the webpage, but not in phpmyadmin ?
<fmay> can anyone give me some ***istance with an error i'm getting with mysql 4.1 - i get an error 28 from the storage engine (a quick web search says that error 28 means out of disk space), yet i'm not anywhere close to capacity. ideas?
<Jy> df -i
<Jy> maybe you are out of inodes
<HarrisonF> fmay: you run out of tmp space maybe?
<fmay> inodes good, nowhere near capacity
<fmay> HarrisonF: does mysql use /tmp by default, or somewhere else?
<somekool> infi doing an alter table default charset/collation on my source would it corrupt the data ?
<infi> I'm not sure, as I think it would depend on from what, to what. but I'd imagine in most cases it would.
<fmay> HarrisonF: aha! /var/tmp, and it filled up rather quickly
<porkpie> hi ...I have multiple db's on a server and I want to sync them with another server .....do the mysql server's need to be the same version ? also what the best way to do this
<TodoInTX> porkpie: do the DBs need to remain in constant sync ?
<porkpie> yeah
<TodoInTX> ok that's pretty straight forward.
<TodoInTX> only the source server would be permitted to modify the tables then.
<TodoInTX> is that a problem ?
<munzir> Hi, on my system any user can see/list all the databases. I solved this by "revoke show databases on *.* from user@localhost" but whenever I restart mysqld I need to redo this! How can I fix this? I tried to add "safe-show-database" to my.cnf to no avail!
<porkpie> TodolnTX:OK I have 2 webservers server A currently hosts the db's server B needs to access these db's ....
<porkpie> TodoinTX:it would be good the have a 2way sync ...
<TodoInTX> porkpie: there really isn't an easy to use/explain way to do that in MySQL.
<TodoInTX> one way replication is simplest.
<TodoInTX> if you have two webservers that need access to one db then just create a grant to allow access from the 2nd as well as the first
<porkpie> TodoinTX:thats what I was doing but ...I can't get the grant syntax to work :(
<TodoInTX> !m porkpie grant
<SQL> porkpie: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html
<Ryushin> Hi all. sorry to jump in and just want help, but I'm having a weird issue with mysqldump. I'm using mysqldump on other boxes just fine, but with this one in particular, it keeps complaining about my command syntax as incorrect.
<porkpie> GRANT ALL PRIVILEGES ON *.* TO foo@"%" INDENTIFIED BY 'somep***' WITH GRANT OPTION;
<TodoInTX> '%' means any network host
<TodoInTX> I.e. not localhost
<porkpie> I have tried localhost as well but it fails
<Ryushin> For example "mysqldump --opt -uroot -pmyp*** mysql" should do a straight dump. But on this problematic machine, it keeps giving me the usage responce.
<porkpie> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
<Ryushin> I've gone through the manual page in depth, and I'm doing to correctly. So I'm at a bit of a loss..
<HarrisonF> Ryushin: it should say something at the very top
<Ryushin> Verbose doesn't even tell me which part of the syntax that it's having problems with.
<Ryushin> HarrisonF: Yea, "Usage: mysqldump [OPTIONS] database [tables]" and the other two standard lines.
<HarrisonF> what is the exact command you issue, copy and paste it
<Ryushin> ysqldump -v --opt -ucccoit -pp***wordgoeshere mysql
<Ryushin> The paste didn't have the "m" but it's there.
<Ryushin> Yea, I can see you thinking, yea, that should work.
<HarrisonF> should be fine
<HarrisonF> what version is it?
<HarrisonF> mysqldump --version
<Ryushin> mysqldump Ver 10.9 Distrib 4.1.10a, for redhat-linux-gnu (i386)
<Ryushin> mysqlcheck works fine. As do the other commands.
<HarrisonF> try doing it with: mysqldump -v --opt -ucccoit -pp***wordgoeshere --databases mysql
<porkpie> is it possible to grant *.* to a new user
<Ryushin> nada.
<Ryushin> Yea, see, this is just insane. It should work. What bugs me is that it's not telling me what is wrong.
<HarrisonF> dunno, for some reason it isn't getting the "mysql" part
<HarrisonF> it thinks you aren't specifying a database name
<HarrisonF> if a --option or -o is wrong, it will tell you
<HarrisonF> try it with --all-databases
<Ryushin> Okay, want somthing scary, mysqldump -v --opt -ucccoit -pp***wordgoeshere started dumping stuff.
<Ryushin> I left off the database part all together.
<Ryushin> Hey, maybe there is a alias.
<HarrisonF> or something in a configuration file?
<Ryushin> Nope. I'll go through the config file in details. I'm not the one that set this sql installation up. So maybe something is there.
<HarrisonF> i bet --all-databases is in a configuration file
<HarrisonF> run:
<HarrisonF> mysqldump --print-defaults
<Ryushin> Crap, that was it. He set up a .my.cnf file and it wasn't reading the default /etc/my.cnf.
<Ryushin> Thanks HarrisonF.
<Ryushin> his cap.
<Andares> Hey, how do I view what fields are inside a table?
<Andares> ?
<Andares> I'm just trying quickly to check something out.
<infi> desc table;
<Andares> Ahh, okay.
<Andares> thank you.
<Andares> and to change stuff, it's MODIFY table SET a = b WHERE field = c; right?
<infi> no.
<infi> !m andares tutorial
<SQL> andares: (MySQL Tutorial) : http://dev.mysql.com/doc/mysql/en/Tutorial.html
<Andares> oh.
<Andares> infi: It doesn't seem to tell me how to modify a table.
<Andares> Only how to create and so on. =/
<infi> !m andares alter table
<SQL> andares: (ALTER TABLE Syntax) : http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html
<Andares> infi: But I don't want to alter the structure of the table itself.
<infi> then you want update or insert, which are likely farther along in the tutorial than you read.
<Andares> UPDATE
<Andares> that's it.
<Andares> modify table cl***ic set x = 30.00 where accname = 'andares';
<Andares> this doesn't work though.
<infi> UPDATE cl***ic SET ...
<Andares> oh.
<Andares> hmm.
<noph> hi folks!
<noph> i got a quite weird problem.
<lethal_dose> Are there any ER diagram tools?
<noph> i'm coming from a mysql 4 server to a mysql 5 server.
<noph> suddenly my mysql_real_query stops working.
<noph> sprintf(query, "SELECT * FROM continents_long ORDER BY continent");
<noph> if(mysql_real_query(&db, query, 255)) {
<noph> this gives me the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
<noph> i can compile this on the mysql 4 server and it works like a charm.
<TheBest> hi all
<TheBest> http://pastebin.com/567655 table IMPORT error.
<TheBest> anybody can help me please. ?
<infi> noph: try mysql_real_query(&db,query,strlen(query)). and what is the actual return value from mysql_real_query() ?
<infi> noph, use snprintf, by the way.
<infi> in this case it doesn't matter, but it's a good habit to form.
<infi> TheBest: what version of MySQL is that running on?
<noph> infi: ill have a look
<TheBest> Your MySQL connection id is 165 to server version: 3.23.58
<TheBest> infi 3.23.58 FC3
<infi> TheBest: 3.x doesn't support ENGINE=foo
<TheBest> so i cant install theat table ??
<infi> no, there's another keyword. hold
<TheBest> ok i wait.
<infi> I dunno if DEFAULT CHARSET or COMMENT will work, either ;)
<infi> !m infi create table
<SQL> infi: (CREATE TABLE Syntax) : http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html
<infi> TheBest: TYPE=MyISAM
<TheBest> ERROR 1064: You have an error in your SQL syntax near 'TYPE=MyISAM' at line 1
<infi> just don't specify it, then. it was the default type in 3.23 anyway.
<noph> infi: Whao, strlen(query) did the thing!
<noph> infi: thanks alot.
<noph> infi: weird that it works on 4.
<noph> the 255.
<TheBest> so what i must to do to edit in VNSB_database.sql ??
<noph> i malloc the querystring to 255.
<infi> noph: if you use malloc, you're feeding it garbage after your query then.
<infi> use calloc
<infi> or zero the string with bzero or memset.
<TheBest> mysql> use calloc;


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

friendshipness quotes
mythtv ubuntu wintv-150
debian /dev/hdi not found
changin localhost gentoo
#gentoo
call to undefined method MDB2 execute
#ai
umbuntu change permissions
eggdrop ftp.so
sony sz hibernation crash



Home  |  disclaimer  |  contact  |  submit quotes