@# 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



Comments:

<0> Deedubb: can i erase all?
<0> and start other time more slow
<1> I'm making a counter so that php can count hits :)
<0> apt-get -purge?
<2> odd, my ubuntu system isn't updating properly
<3> will an update made on a slave db also update the data on the master db?
<1> Is it effecient to make a table with one feild for a hit counter?
<4> dca, no
<4> peterFA, depends on your table structure. what kind of table are you putting it in? or is that the only field in the table?
<1> infi, yes, it's the only feild in the table.
<4> kind of .. silly :) but it would be fine I imagine
<1> infi, I'm making a practical hit counter.
<4> it might be more worthwhile to just store your entire apache log into the table, and then use a SELECT COUNT(*) WHERE page = "/somepage.html" to count the rows, as you'd be able to do more with it
<4> peterfa, really in that case, the overhead of a SQL table seems overkill. just using a flat file to store an integer value seems more logical.
<2> infi: that's crazy
<4> but if you want to keep it all in the database, it won't really matter



<4> deedubb, what is?
<1> infi, I plan to use mysql for other web development purposes.
<2> infi: it must be better to keep a hit counter separate then doing a lot of work to get the same stat
<4> deedubb, I don't believe in data duplication, as it gets out of sync
<1> infi, like stick all content into mysql and use that in PHP
<3> infi: hmm, so if replication is unilateral, and clustering if only practial on a LAN, what would you do for *bilateral* replication?
<4> peterfa, just make a table named "Meta" or something, and stick a counter BIGINT into it, and then you can extend it later with other fields if/when necessary.
<2> porrie: on a fresh install the server is using the socket as defined in the config; I dunno whats up with your configuration
<1> infi, I made a table called counter with a feild count
<2> but the fact that you have two my.cnf (which I don't)
<2> makes me think you made a oops
<2> poori: maybe you just need debconf
<2> typed it wrong 2x
<4> peterfa, that's fine, but imagine if you have other information you want to store in it later, the table name won't really be representative. not a functional problem though, it'll work fine.
<2> then he can learn the alter table syntax ;)
<5> what does "nice" mean in the my.cnf?
<1> infi, I thought of adding a content table and sticking the html/php in there.
<1> karrot-x, it's priority, I think
<2> PeterFA: then what you might want to do is a have a 'hits' column with the content
<1> Deedubb, hmm, that's an even better idea
<1> so, how big should I make a feild for the content?
<4> dca[laptop]: http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-overview.html
<1> Looks like I'm turning apache into a png server :P
<2> depends how popular your site is; int(11) would be enough for all my stuff, but bigint is likely the best
<2> anyway, gotta jet
<4> peterfa, putting all of the content in there (images or pages) is also foolish, that's what the filesystem is for
<4> you'll reduce your site performance way down
<5> by default am i supposed to be allowed to telnet localhost 3306?
<1> infi, well, not pictures :P
<3> infi: i'm ...somewhat... familiar with clustering and it's my understanding that the traffic it generates is not practial on geographially seperated mysql servers
<2> PeterFA: you'll want to check out query caching if you're keeping page text in your database - makes mysql a lot quicker
<1> infi, I though of breaking up each page into it's respective parts. The first is doctype crap, then the <-- about this page --> stuff, and then the start of the html and so on.
<4> that wouldn't be quite so bad, but I'd also store that on the filesystem itself... it's there for a reason ;)
<4> but whatever
<1> infi, well, I guess a combo system wouldn't hurt.
<1> infi, I have to have a respective file on the fs anyways.
<1> I could just stick certain peices of info into the stream from mysql, and use a hit counter on each page, which would be managed by mysql
<4> dca[laptop], I'm not sure in that case. I haven't implemented that architecture before, while having to keep the databases in sync remotely. I would think you'd need a high speed backend connection between the sites, if you run high traffic sites.
<4> peterFA, sure
<1> How big should I make a feild if I want to stick some html content in there?
<4> dca, you might try on the mysql mailing lists, as I'm sure you're not the first person ever to need it.
<1> Right now, I need to learn how to make php interface with mysql.
<4> peterFA, it depends on how much you're storing. TEXT can store 65535 chars, MEDIUMTEXT = 16 megs, LONGTEXT = 4 gigs
<6> whats up jared`
<4> 16, 24, 32 bits respectively.
<7> hey
<7> can i pm you
<6> 'taco' said you need help
<5> how do i create a user for ownership?
<6> just post it in here, were all here to help
<1> infi, I don't think I have 4 gig htmls :)
<4> I still wouldn't put the pages in the database in the first place...
<1> 65 kilos, I think I'm well within that range, esp. if I do things as I plan.
<3> infi, tks, i'll send a msg to the lists
<7> i dont know much about databases, and i wanted to create something to hold a bunch of recipes for a project for school.. are there "templates" or something to get me started?
<4> PeterFA, picture this:
<6> jared` http://dev.mysql.com
<6> and well as numerious site found via google
<4> Web Request -> Web Server -> PHP Script Executes -> Queries DB Server -> DB server reads page from disk -> DB server transfers full page to web server across network -> PHP script generates page -> Sends across internet to client
<7> yeah but i dont really know what im doing.. lookin for a little guidance



<4> vs.
<6> well the imporant lessons you need to lear are normilazation / normal forms
<4> Web Request -> Web server -> PHP script -> local filesystem -> Web server sends to client
<4> pulling whole pages out really will affect your performance noticeably
<6> http://www.15seconds.com/issue/020522.htm
<7> k thx
<1> infi, mysql is on the same box as apache, does that matter?
<4> it'd be faster, but still slower than the disk access
<4> maybe a 5% loss there
<4> it's mostly a design thing
<4> in that case
<1> ok
<4> I also split my pages up, but I use templates on the filesystem, read them, and fill them with the appropriate data, combine them, and print them
<1> infi, I wanted to split pages up.
<4> my database stores actual logical data, not the pages themselves
<4> page content is also another thing that can be stored (news stories, blog entries, whatever)
<4> but the structure of the page itself imho is better served from the filesystem itself.
<1> infi, page content, you mean in the db?
<4> content as in, news stories, blog entries, as I said
<4> the layout of the page on the filesystem, the page stories, etc., things that can be logically normalized and stored can go inside.
<4> i.e. dtmCreated, txtStory, txtAuthor <- can hold a new story or a blog entry, or whatever
<4> s/new/news/
<1> I see
<4> think every page hit having 5 queries to pull, for example, the page header, body, footer, contents, and counter out, rather than just 1 to pull the contents.
<1> Now, I just have to find a way to make apache access the db.
<1> You know a goog tutorial for this?
<4> PHP does that.
<4> and I don't do PHP, so I don't know ;)
<1> Oh, heh
<4> check their channel
<8> if I have a `weight` stored in a table, and want to use it to weight randomly orderd results, is there another method other than ORDER BY (RAND() * weight) ??
<5> does anyone here know how to get mysql_config in debian sarge?
<9> karrot-x: problems to install mysql-query-browser ???
<9> i find it installing libmysqlclient from apt...
<5> ?
<9> when i'm compiling the mysql-query-browser on debina sarge, this file was missing
<9> until i get libmysqlclient
<5> oh, no maildrop
<9> try this lib, it solved my problem......
<10> Is there any way to truncate a datetime in mysql? I want to get the start of the half hour
<11> hey
<5> g33km4st3r: thanks
<11> on linux, where are the database files saved?
<4> various places. check /var/lib/mysql
<1> hmm, I got an access denied message for user in my mysql db.
<1> How do I set up a username and p***y for the db?
<4> !m PeterFA grant
<12> PeterFA: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html
<1> Yikes!
<1> infi, I've no idea what to do with that information.
<4> grant all privileges on database.* to foo@'hostmask' identified by 'p***word'; is the gist of it, ***uming you want full read/write access to all tables
<4> replace database with your DB name, foo with your username, hostmask as your host, and p***word with your p***word
<4> hostmask can also be "localhost" (with no quotes) if you only want local access
<4> as in, foo@localhost
<1> looks like apache@localhost
<4> PeterFA, you might want to start here: http://dev.mysql.com/doc/refman/5.0/en/tutorial.html
<10> truncating times .. is there any better way: FROM_UNIXTIME( FLOOR( UNIX_TIMESTAMP( field ) / (30 * 60) ) * (30 * 60) )
<4> PeterFA, remember, the username and p***word for the database are completely separate from the ones for your system.
<1> infi, k, thank you
<1> I need to add a user to mysql
<4> I just showed you how
<4> that grant line I pasted above, and the instructions on the next line will do it
<1> Where do I enter that grant command?
<4> .. in the mysql client
<4> if you can't get in, go through that tutorial I pasted you earlier
<1> I got in, the command doesn't work
<1> ERROR 1064 (42000): You have an error in your SQL syntax;
<4> copy and paste exactly what you typed
<4> don't try to retype it
<1> grant all privileges on database.* to apache@localhost identified by 'xxxxx';
<4> you need to change the word "database" to whatever your database is called
<1> ok
<4> if you haven't created it yet, do this:
<1> ok


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

lowercase a string in perl
#sdl
#perl
#kernel
#web
#javascript
LVM alternate install Ubuntu
perl chdir with *
#php
#lisp



Home  |  disclaimer  |  contact  |  submit quotes