Re: gmane

2012-08-14 Thread Daniel Brown
On Mon, Aug 13, 2012 at 8:25 PM, Thufir hawat.thu...@gmail.com wrote:
 Looking at:

 Group   gmane.comp.db.mysql.general
 Description The main list for general MySQL discussion
 Address mysql@...
 Status  posting allowed
 http://dir.gmane.org/gmane.comp.db.mysql.general

 It would really be nice if posting were actually allowed, but apparently
 this is not the case and the list is read-only on gmane.  Would it be
 possible to change that?

Posting is allowed --- directly to the list, as you just did.
You're hoping to change it to be able to post from Gmane to the list?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: New Fast MySQL Compatible Server

2012-04-03 Thread Daniel Brown
On Tue, Apr 3, 2012 at 04:10, Johan De Meersman vegiv...@tuxera.be wrote:
 - Original Message -
 From: Singer X.J. Wang w...@singerwang.com

 Perhaps something called a VM can be use?

 Perhaps something called documentation can be provided?

 I also notice that the original poster seems to have vanished again, which 
 makes the whole thing even more shady.

I see this morning that the site says, Pre-release field
evaluation will be conducted when licensing is arranged.  The link to
download the file is no longer there.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: mysql listed as attach page by google?

2011-09-26 Thread Daniel Brown
On Mon, Sep 26, 2011 at 14:30, Michael Albert m_albert...@yahoo.com wrote:
 I don't suppose I am the first to notice this, but most of
 the pages on dev.mysql.com have been listed by google
 as attack pages, e.g http://dev.mysql.com/downloads/.
 Has there been a problem, or is google being overzealous?

Here's an explanation:


http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=http%3A%2F%2Fdev.mysql.com%2Fdownloads%2Fclient=googlechromehl=en-US

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP] mysql error

2011-05-05 Thread Daniel Brown
On Thu, May 5, 2011 at 10:29, Grega Leskovšek legr...@gmail.com wrote:
 Can smbd please look  at this sentence - I got an error and do not
 know how to fix it - I am still very unfamiliar with MYSQL:

 CREATE TABLE log (  idlog int auto_increment not null,  imepriimek
 varchar(50),  clock timestamp,  action varchar(30),  onfile
 varchar(100), filesize float(6,2), uniqueid(idlog) );

 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 '(idlog) )' at line 1

This is by no means a PHP question, and should not be asked on the
PHP General mailing list.  Please ask questions in the appropriate
place; for this, the MySQL General list is the correct forum, and
they've been CC'd.  In the future, if it relates to a PHP database
issue, you may want to use the PHP Database mailing list, also CC'd.
This not only means you'll get more on-target help faster, but also
helps in archiving data in the proper location for future searchers.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP-INSTALL] php - libmysqlclient question

2010-12-29 Thread Daniel Brown
On Wed, Dec 29, 2010 at 04:57, Hajo Locke hajo.lo...@gmx.de wrote:
 Hello,

 i want to talk from php to different mysql-servers with different versions.
 is it a recommend way to compile php always against newest libmysqlclient or
 not so important?

You should use the newest stable version so you can take advantage
of the latest features and fixes, but unless you're going back really
far - like MySQL 3.23 - any modern client version should have no
negative impact.  Even in that case it may not, but that's a better
question for either the php-db@ list or the MySQL General list (both
CC'd for folks to add anything I may have forgotten).

-- 
/Daniel P. Brown
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Daniel Brown
On Fri, Jun 18, 2010 at 16:30, Dave deal...@gmail.com wrote:
 SELECT * FROM contacts WHERE state = 'CA' and   name = 'bob' or
 name = 'sam' or name = 'sara' 

We begin by asking on the right list (mysql@lists.mysql.com, CC'd
by courtesy).

You're on the right track though.  Try a WHERE...IN statement:

SELECT * FROM contacts WHERE state='CA' AND name IN ('bob','sam','sara');

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP] SQL Syntax

2010-06-15 Thread Daniel Brown
[Top-post.]

You'll probably have much better luck on the MySQL General list.
CC'ed on this email.


On Tue, Jun 15, 2010 at 20:58, Jan Reiter the-fal...@gmx.net wrote:
 Hi folks!

 I'm kind of ashamed to ask a question, as I haven't followed this list very
 much lately.



 This isn't exactly a PHP question, but since mysql is the most popular
 database engine used with php, I figured someone here might have an idea.



 I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =
 A(uid,pid) and another table B, containing 3 fields. The picture ID, an
 attribute ID and a value for that attribute = B(pid,aid,value).



 Table B contains several rows for a single PID with various AIDs and values.
 Each AID is unique to a PID.  (e.g. AID = 1 always holding the value for the
 image size and AID = 3 always holding a value for the image type)



 The goal is now to join table A on table B using pid, and selecting the rows
 based on MULTIPLE  attributes.



 So the result should only contain rows for images, that relate to an
 attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID =
 5 that equals 'jpg'.



 I know that there is an easy solution to this, doing it in one query and I
 have the feeling, that I can almost touch it with my fingertips in my mind,
 but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
 CRAZY!!



 I appreciate your thoughts on this.



 Regards,

 Jan





-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: I would like to post on lists.mysql.com

2010-01-30 Thread Daniel Brown
On Sat, Jan 30, 2010 at 01:49, Vikram A vikkiatb...@yahoo.in wrote:
 Dear Admin,

 I would like to share and get inputs from experts on MYSQL Db.

 I request you to grant access to me.

You may not have noticed, but you're already posting to the list.
All you have to do is subscribe and you have full access.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Looking for hosting or dedicated servers?  Ask me how we can fit your budget!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Warning: OutsourcingRoom.com

2009-08-04 Thread Daniel Brown
Just as a heads-up, in case you guys weren't yet aware (cross-posting):

Elance.com was the victim of an SQL injection attack earlier this
summer (they apparently missed our billions of threads on sanity).
According to their folks, only names, company names, phone numbers,
and email addresses were taken.  Whether or not that's true, I don't
know, but that's beyond the scope of this warning.

The most recent attempt to get more of your personal information
comes from a (*possibly* legitimate) website named
OutsourcingRoom.com.  If you have been a member of Elance, you may
have already received the message from OSR that claims that you signed
up with them, and gives you a username and password.  Now, I'm not
here to tell you guys and gals what to do, but taking the facts into
account - the stealing of private information by breeching the
security of a competitor - it's entirely up to you as to whether or
not you'll consider OSR a trustworthy business.  Chances are, they'll
not only charge you for using the service, but will also be so kind as
to reuse (or redistribute) your private and financial information,
should you be willing to give it to them.

We've already received numerous hits on our network for
OutsourcingRoom.com and one or two other shoddy attempts to gain more
information.  Today the emails seem to have picked up significantly,
and appear to be not only valid, but professionally-crafted.
Thankfully, we were anticipating such, after being alerted to the
attack by Elance themselves.  Perhaps a bit embarrassing for them, but
it was a good move to mitigate the damage post-fact, in my opinion.

That's it.  Just trying to keep everyone from getting scammed and
screwed.  For more information, check Google, as always.  ;-P

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: JOomla Administrator

2009-07-20 Thread Daniel Brown
On Mon, Jul 20, 2009 at 15:03, Dave Shariff Yadallee -  System
Administrator a.k.a. The Root of the Problemr...@doctor.nl2k.ab.ca
wrote:
 Hello, we are trying to move a Joomla Site
 and the administrator does nowrk.

 Using MySQL 5.1.36 on MAC OS X Server.

 How can I fix this?

This would be a question to ask the Joomla folks.  It's not a
MySQL issue, at least on the surface.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: [PHP] mysql cache query as xml

2009-07-10 Thread Daniel Brown
Chris;

From my understanding of your question, your message (included
below in its entirety) is better sent to the MySQL General list, which
I've CC'd on this reply.  If you haven't yet, please subscribe there
at mysql-subscr...@lists.mysql.com to follow the thread for responses.

If I'm misunderstanding and you're asking a PHP-related question,
please rephrase your question.

[Full original message follows.]


On Fri, Jul 10, 2009 at 12:22,
workerho...@studysite.euworkerho...@studysite.eu wrote:
 hi guys, i need some help by optimize the performance.
 my problem is that i need a lot of rows the whole site (don't ask i need the
 rows really :-) )
 this is about ~4000 rows it will be loaded from mysql database in 0.3
 seconds
 my idea was to cache this rows in a xml file like for example:

 category
   idsome hash id/id
   titlecategory title /title
 /category
 ..

 also load query from mysql first, save to xml using 6 hours, erase the
 cached file, load query against
 but to load the same num rows from xml during more then 3 seconds in
 comparison mysql need just 0.3 seconds.

 how can i optimize the reading from xml faster?

 server design:
 2 mysql server (Master  Slave with Replication  )
 8 Applikation Server with connect to the 2 mysql server

 this i the reason why i want to cache this query anyway! other querys just
 need about 0.0004 seconds, but this is the slowest query!
 i hope someone can help me or had a better ideas to solve this problem!

 thanks chris


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: A good US Hosting Site?

2009-04-20 Thread Daniel Brown
On Sun, Apr 19, 2009 at 23:42, Cameron Rogers cameronl...@gmail.com wrote:
 Hi everyone.  I am starting my first web site.  I have a temporary contract
 with godaddy but know there are better options out there.   The only problem
 is, I don't know reliable sources to research which hosting program to use.
 Any recommendations on a hosting sight or some good resources to find a
 hosting site.  I need a hosting site that allows me to:
 1.  Use PHP/MYSQL
 2.  Send 1000 + emails a day   -- the mail function has been my greatest
 limitation with godaddy

Actually, Cam, you can just contact GoDaddy to lift the limit,
depending on your arrangement.  Their dedicated servers had a limit of
3,000 emails per month, at least as recent as 2007, and all that was
required was sending them a request and agreeing to a statement that
said you would not send SPAM.  There are probably other reasons why
not to use them, but if that was your biggest issue, it's one that may
well be easy to fix.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: ATTN: OWNER/MODERATOR

2009-03-30 Thread Daniel Brown
On Mon, Mar 30, 2009 at 19:45, Dian Crayne dcra...@crayne.org wrote:
 Chuck Crayne (ccra...@crayne.org) has died.  I am his widow.
 I cannot unsubscribe him from this list because I do not
 have his user name  and password.  Please remove him from your
 membership list.  If you need to talk to me about this, my
 phone number is (707) 459-2623.

Dian,

I'm truly, genuinely sorry for your loss.  I read of Chuck's
unsubscription from this world in February.  He seemed like a
brilliant and intriguing man.  I'm sorry that I never had the chance
to meet him.

I've tried to help you out a bit by initiating an unsubscribe
request from the list.  In his inbox you should've received, a few
moments ago, an email with instructions on how to complete the
unsubscription.

It also reminds me to download some of the software he wrote years
ago onto my Linux machine.  He had converted some old, old text-based
adventure games from the original 5 1/4 floppy disks to hard drive
images, and made them cross-platform compatible, among other things.
And anyone who would go out of their way still, in this day and age,
to go through Assembly code as a hobby truly deserves to be
remembered.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: grabbing even addresses?

2009-02-02 Thread Daniel Brown
On Mon, Feb 2, 2009 at 13:43, Martin Gainty mgai...@hotmail.com wrote:

 select ADDRESS FROM FUBAR_TABLE WHERE MOD(TO_
 NUMBER(SUBSTR(ADDRESS,1,instr(ADDRESS,' ',1))),2) =0;

That hit the nail right on the head.  That was the same thing I
was going to suggest, Martin.  I think people tend to forget that
MySQL has the ability to handle a lot of stuff inside its own engine.
The only problem is the potential performance degradation --- if it's
an issue, translating that to PHP (which is the language in which
Jason is doing his code) isn't a problem.

In any case, your answer is the one I would consider correct for
the OP's question.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Is deleting the .FRM, .MYD and .MYI files the same as dropping table?

2009-01-15 Thread Daniel Brown
On Thu, Jan 15, 2009 at 20:44, Daevid Vincent dae...@daevid.com wrote:
 I've been tasked with cleaning up a bunch of 'eventum' tables that got
 accidentally dumped into several databases and then replicated.

 I'm wondering if I can just go through with a simple  command to blow
 these all away:

 find /var/lib/mysql/ -name eventum*

 Or is there some other magic that a DROP TABLE eventum* does?

To avoid corruption and keep things in sync, you *should* keep it
all in MySQL and DROP IF EXISTS but in a pinch or in dire
situations, I've killed the trio of files and restarted MySQL and
achieved the same result.

Short answer to the question in your subject, Daevid: yes, but
it's not the Right Way[tm].

Hello, by the way.  ;-P

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: a question...

2008-07-23 Thread Daniel Brown
On Wed, Jul 23, 2008 at 11:45 AM,  [EMAIL PROTECTED] wrote:
 Guys,

 I have been fighting with mysql trying to get it to only show every after
 the last dot(.) on a ip. for example

 instead geting 10.0.0.0 only get 10.0.0

As pulled from a database row?  Sorry, I didn't quite understand your email.

-- 
/Daniel P. Brown
Better prices on dedicated servers:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: a question...

2008-07-23 Thread Daniel Brown
On Wed, Jul 23, 2008 at 12:10 PM,  [EMAIL PROTECTED] wrote:
 Yes, sorry. I have a database that records ip of attacks on a customer
 server, what I like to do get a count so that I can see what subnet is
 doing the major of the attacks.

 select ip from ipslimit 10;
 +-+---+
 | ip  | count(ip) |
 +-+---+
 | 83.117.196.206  | 1 |
 | 85.17.109.28| 1 |
 | 125.138.96.19   | 1 |
 | 89.110.148.253  | 1 |
 | 192.168.105.10  | 1 |
 | 200.170.124.72  | 1 |
 | 201.116.98.214  | 1 |
 | 202.168.255.226 | 1 |
 | 203.89.243.158  | 1 |
 | 210.245.207.217 | 1 |
 +-+---+
 10 rows in set (0.00 sec)

Okay, this would have to be done in code, and isn't a MySQL issue.
 Presuming you're using PHP, I'm going to also copy this message to
the PHP General mailing list, Payne, so that others can benefit from
it in the archives as well.  If you're not already subscribed and
would like to follow along with the thread, please send a blank
message to [EMAIL PROTECTED]

To get the Class C on that, here's a simple function you can use:

?php
function get_subnet($ip) {
return substr($ip,0,strrpos($ip,'.'));
}
?

As a quick illustration of how it works, here's an example script
(to use MySQL, just replace the $ips array with your ?php $row =
mysql_fetch_array($result); ? or similar line):

?php
$ips = 
array('192.168.0.0','10.0.0.1','127.0.0.1','216.37.159.240','99.99.99.99','127.0.0.2','192.168.1.1','10.0.0.0','192.168.0.1','192.168.0.150');

function get_subnet($ip) {
return substr($ip,0,strrpos($ip,'.'));
}

foreach($ips as $ip) {
echo $ip.'s Class C is .get_subnet($ip).\n;
}
?


-- 
/Daniel P. Brown
Better prices on dedicated servers:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Query problem

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 4:35 AM, sivasakthi [EMAIL PROTECTED] wrote:
 Hi all,

  Iam  having the one table name called AccessDetails and data inside that
  tables is following,

[snip=schema]

  In that , I need to calculate the number of total sites , number of
  total Accessed Sites,number of total Denied Sites and  number of total
  Overriden Sites based on the particular Virus_Category,UserName,Date


  How can form the query to achieve that??

  I have used the following query but the total site is not correctly
  displayed..

You may want to look into the ROLLUP modifier.  Here's the manual entry:
http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: grant user privileges

2008-04-16 Thread Daniel Brown
On Tue, Apr 15, 2008 at 9:03 AM, Hiep Nguyen [EMAIL PROTECTED] wrote:
 hi all, i have an existing database (internal) with a user named 'admin',
 everything works fine as far as privileges concern.

  i just created a new database (test) and want to grant admin's privileges
 on test as same as internal.

  how do i do this???

  i tried (as root):

  grant all on test.* to 'admin'@'localhost';
  grant all on test.* to 'admin'@'10.0.0.%';

GRANT ALL PRIVILEGES ON test.* TO 'admin'@'localhost' IDENTIFIED
BY 'passwordString';
GRANT ALL PRIVILEGES ON test.* TO 'admin'@'%' IDENTIFIED BY
'passwordString';
FLUSH PRIVILEGES;

The first query grants all privileges to admin when accessing the
host locally.  The second query allows you to connect from ANY host.
The third query flushes the old privileges data and ensures that the
updated mysql.users information is used.  Be sure to replace
passwordString with your password.

If you only want access to be on the Class C private network
subnet for 10.0.0.x (RFC 1918) as well as localhost, then adjust query
#2 to:

GRANT ALL PRIVILEGES ON test.* TO 'admin'@'10.0.0.%' IDENTIFIED BY
'passwordString';

 and then FLUSH PRIVILEGES; again.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: grant user privileges

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 1:18 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:

  is there any command that can set so that admin's privileges on internal =
 admin's privileges on test???

  what i'm trying to avoid is manually adjust admin's privileges on test if
 admin's privileges on internal changed.

  if it's not still clear, then stupid menever mind.

If I'm understanding correctly, you want user 'admin' to be able
to access multiple databases, using one password and one permission
set.  If that's the case, then yes, it can be done but as far as I
know, only by selecting ALL databases.

Such as:

GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY
'passwordString';
FLUSH PRIVILEGES;

Then, when updating privileges for 'admin', just include *.*
instead of a particular database.table limit.

Keep in mind, though, that 'admin' will then have access to EVERY
database on the server.  I'm not sure that there's a way to
comma-delimit (or something of the type) a select few database.table
configurations.  A quick search of the web didn't show any different
either.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: [Stored Procedure] - Error handling

2008-04-15 Thread Daniel Brown
Ratheesh,

There's a specific list for PHP database functions, Databases and
PHP (PHP-DB), which you can find at http://php.net/mailinglists .
I'm forwarding your message over to there, and recommend that you
subscribe to that list.  You'll probably get more direct responses by
narrowing-down the lists to the support you need.

LIST: Original message follows.

On Tue, Apr 15, 2008 at 12:53 PM, Ratheesh K J [EMAIL PROTECTED] wrote:
 Hello folks,

  Any way to retrieve the error code/error number from a stored proc.

  Scenario
  --

  calling a stored proc from PHP - using mysqli_multi_query()
  The stored proc has multiple queries. Lets say one of the queries generates
  an exception.
  How do I retrieve the error message within the procedure itself?

  OR

  Is there any way from PHP to get the last error msg? I tried with
  mysqli_error().. Did not work..

  Any inputs will be appriciated.

  Thanks,
  Ratheesh


-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Spring 2008 MySQL Magazine released!!

2008-04-15 Thread Daniel Brown
On Tue, Apr 15, 2008 at 2:20 PM, B. Keith Murphy [EMAIL PROTECTED] wrote:
 Hey everyone,

  I just posted the Spring issue of the MySQL Magazine.  This issue contains
 a great group of articles that you will want to read.  In addition, Sheeri
 Cabral did a fabulous job with a new layout for the magazine.  It is as
 always FREE!!.

  Available for download from http://www.mysqlzine.net or
 http://www.paragon-cs.com/mag.

  thanks and enjoy!!

  Keith Murphy

Looks good at a glance, Keith!  Congrats!

I'll print it and check it out when I get home tonight, but I
wanted to respond to the thread to let anyone else who may be using
KGhostView 0.20, like myself, that all pages appear blank.  This is
not a problem with the magazine, but appears to be a bug in KGhostView
itself, so you will probably have to view the PDF with a different
version or with an official Acrobat release.

I'm going to submit a bug report with the project, but just wanted
to put out a heads-up here on the list in case anyone else runs into
the same problem and gives up before checking into it further.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysqldump

2008-04-15 Thread Daniel Brown
On Tue, Apr 15, 2008 at 3:11 PM, minky arora [EMAIL PROTECTED] wrote:
 Hi Gurus,
  I am a newbie.Please bear with me.
  Could someone pls guide me as to the best way of adding excel files as
  tables to Mysql ?

mysqldump is for exporting data.  What you're looking for is the
LOAD DATA [LOCAL] INFILE command.

Dump out your Excel data to a CSV and import it by using the
manual entry as a guide:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem attempting to use load data into

2008-04-14 Thread Daniel Brown
On Mon, Apr 14, 2008 at 1:29 PM, Jason Pruim [EMAIL PROTECTED] wrote:
 Hi Everyone,

  I am attempting to use this command: load data infile
 '/volumes/raider/elks.test.txt' into table elksCurrent fields terminated by
 '\t' lines terminated by '\n';
[snip!]

  The error that I'm getting is:

  | Level   | Code | Message
 |

 +-+--++
  | Warning | 1366 | Incorrect integer value: 'Record' for column 'Record' at
 row 1

That's because it's attempting to insert the name of the columns
from your CSV into MySQL --- and 'Record' is not a valid INT.


-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem attempting to use load data into

2008-04-14 Thread Daniel Brown
On Mon, Apr 14, 2008 at 3:33 PM, Jason Pruim [EMAIL PROTECTED] wrote:

  On Apr 14, 2008, at 3:29 PM, Daniel Brown wrote:
 
That's because it's attempting to insert the name of the columns
  from your CSV into MySQL --- and 'Record' is not a valid INT.
 

  Replaced field name with 0 and had the same end result... Just no error.
 But I get the first row included! Which is just field names and a 0 for
 good measure :)

  Any other ideas Master Brown? :)

  ***Before I get yelled at for not showing respect please note that I know
 Dan from another list and I am allowed to give him crap like this no matter
 what he says :P

I don't know you from Adam, you insignificant little cur!  ;-P

Does your file actually have the characters \t \t \n at the end of
each row like that?

Send it to me as an attachment off-list and I'll help you figure
it out and then post back here for the MySQL archives.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem attempting to use load data into

2008-04-14 Thread Daniel Brown
On Mon, Apr 14, 2008 at 3:45 PM, Daniel Brown [EMAIL PROTECTED] wrote:

 Does your file actually have the characters \t \t \n at the end of
  each row like that?

 Send it to me as an attachment off-list and I'll help you figure
  it out and then post back here for the MySQL archives.

Sorry, got sidetracked with the day job and the pre-wife nagging me.  ;-P

Anyway, as I suspected, you did have literal \t and \n characters.
 I wrote a script to fix it, and I'll link you to the updated CSV
file.  Run that with the IGNORE 1 ROWS command and you should be set.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: [PHP] joins issues again

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 7:28 AM, Steven Macintyre
[EMAIL PROTECTED] wrote:
  Hi all,

  I have the following SQL statement;

  SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
 FROM sales
 LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
 LEFT JOIN branch ON IGuser.branchID = branch.branchID
 LEFT JOIN company ON branch.companyID = '{$companyID}'
 WHERE maincompanyid = '{$mcid}'
 GROUP BY branch.branchID
 ORDER BY branch_name ASC

  However, i do not want those join records to be appended, only to return the 
 count of records from sales.

  Can someone assist me with this? I have tried differance variants of joins 
 and none of the results are correct.

  Sales tbl doesnt have the companyID, nor does IGuser

Steven,

Since this isn't a PHP-specific question, you'll probably receive
better responses on either the MySQL list (you didn't mention which
database system you're using, but I'll blindly and ignorantly assume
that's it), or at least the PHP-DB list.  I'm CC'ing both of those for
you.

-- 
/Daniel P. Brown
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql replication

2008-03-31 Thread Daniel Brown
On Mon, Mar 31, 2008 at 9:39 AM, Kaushal Shriyan
[EMAIL PROTECTED] wrote:
 Hi

  Is there a documentation on replication of MySQL Database on Gentoo

From the manual:
http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connections on Database

2008-03-31 Thread Daniel Brown
On Sun, Mar 30, 2008 at 9:59 AM, Velen [EMAIL PROTECTED] wrote:

  Hi,

  How can i limit connections to my database?

RTFM: http://dev.mysql.com/doc/refman/5.0/en/user-resources.html

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Optimize db update

2008-03-21 Thread Daniel Brown
On Fri, Mar 21, 2008 at 9:14 AM, Velen [EMAIL PROTECTED] wrote:
 This does not solve my problem.  DatabaseA and DatabaseB are on 2 seperate
  pc and the only communication that can be use between the two PC is a USB
  pendrive.

  Is there another way of copying a table from one Database to another?

Yes, but it won't validate the data.  You'd have to find a way of
doing that based on what you need to validate.

PC 1: mysqldump -u username -p database_name table_name  table_name.sql
L Copy .sql file to pen drive.
PC 2: mysql -u username -p database_name  table_name.sql

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Optimize db update

2008-03-21 Thread Daniel Brown
On Fri, Mar 21, 2008 at 10:04 AM, Velen [EMAIL PROTECTED] wrote:
 This one is alright but is there an alternative that can be run with the
  mysql prompt?

Not to dump a file, but to import, yes.  Check out the LOAD DATA
INFILE command:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Optimize db update

2008-03-20 Thread Daniel Brown
On Thu, Mar 20, 2008 at 1:41 PM, Velen [EMAIL PROTECTED] wrote:

  Actually I am updating TableA in DatabaseA with values from TableB in 
 DatabaseB.  Database B is on a stand alone PC.  I'm using VB6 to create a 
 .txt file containing data from TableB then using VB6 once more to 
 recronstruct the table in DatabaseA then remove all data which are already in 
 TableA and insert the remaining.
[snip!]
  How can I optimise this process? and What are the alternatives available ?

If you don't absolutely need to use VB6, why not use something
with native support like PHP?

?
function dba_query($sql) { // Simply return the connection resource ID
// Select the primary database
$dba_conn =
mysql_connect('hostname_a','username_a','password_a') or
die(mysql_error());
$dba_db = mysql_select_db('database_a',$dba_conn);
$r = mysql_query($sql,$dba_conn) or die(mysql_error());
return $r;
}

function dbb_query($sql) { // Simply return the connection resource ID
// Select the secondary database
$dbb_conn =
mysql_connect('hostname_b','username_b','password_b') or
die(mysql_error());
$dbb_db = mysql_select_db('database_b',$dbb_conn);
$r = mysql_query($sql,$dbb_conn) or die(mysql_error());
return $r;
}

$sql = SELECT field1,field2,field3,field4 FROM table_a;
$result = dba_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$ssql = INSERT INTO table_b(field1,field2,field3,field4)
VALUES(
'.$row['field1'].',
'.$row['field2'].',
'.$row['field3'].',
'.$row['field4'].'
};
dbb_query($ssql) or die(mysql_error());
}
?

If you decide to go that route, I recommend subscribing to the
PHP-DB list at http://php.net/mailinglists (referred to there as
Databases and PHP).  You should see a significant gain in
performance using a native client as opposed to what you're now using
(probably an ODBC DSN, MyODBC, or a JDBC hack).

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Are user privileges included in MYSQLDUMP

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 12:15 PM, Brown, Charles [EMAIL PROTECTED] wrote:
 Using mysqldump, I'm about to dump all databases and import to another
  instance - new . My question is do I need to define all security and
  users in the new mysql  or the security definitions and privileges will
  be included in the dump file created by mysqldump.

If you dump all databases, you're also dumping the mysql.user
table, which is where privileges and login information for the other
databases is stored.  So as long as the MySQL versions are the same
(or comparable) on the original host and target host if you're using
password hashing, or if everything is in plain text, you should be
just fine.

  Please help me!

Hey, Charlie Brown, why's everybody always pickin' on you?  ;-P

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Security overrides in mysql.cnf

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 3:51 PM, Brown, Charles [EMAIL PROTECTED] wrote:
 I inherited a mysql server database. Stuff are not documented.  My
  question is: Are there any security work-arounds in mysql. I have access
  to the cnf file. I need to get in and dump the database. I was told that
  the cnf file allows security over rides. Please help

  I have tried mysql -uroot.  It didn't work

Did you use the -p flag and supply the root password?

You'll need to be root to dump all of the databases.  If it's on a
cPanel/WHM server, you can use WHM to reset the MySQL root password if
you don't know what it is.

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: write lock and sql_cache

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 3:15 PM, MAS! [EMAIL PROTECTED] wrote:
 does the lock table on MySQL (I'm using 5.0.22 or 5.0.45) works
  even for a cached result?

Hold your horses, dude.  That's the third time you sent that
email.  Someone will give you an answer if you're patient.

If you can't wait (or don't feel like it), check out the forum at
http://www.mysqlfreaks.com/.

Best of luck, Marco!

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Migrate HUGE Database

2008-03-12 Thread Daniel Brown
On Wed, Mar 12, 2008 at 3:26 PM, Tim McDaniel [EMAIL PROTECTED] wrote:
 On Wed, 12 Mar 2008, Michael Dykman [EMAIL PROTECTED] wrote:

   It's quite simple; -p, --password takes an optional argument which
   it will only look for if
  a) the short form is immediately followed by a non-space char

  I thought I'd made it clear above that I understand the rule.  I am
  complaining (in a forum where no maintainer is likely to be present,
  unfortunately) that it was a bad design that made -p be parsed
  differently from -u and likely all the other switches.  A wise
  consistency is useful, because users have to remember fewer rules.

It's not unheard of for those who maintain the code and
information to subscribe to the general lists as well.  I'm a PHP/docs
maintainer and am very active on the PHP-General list, for example.
The same applies for several others, and several other projects (I'm
also on with Mozilla, Mandriva, KDE, etc.).

My guess - and keep in mind, it's *strictly* a guess - is that -p
differs from -u and the like in case your password begins with a
space, which is valid for MySQL passwords.  If you still wanted to
pass a space-starting password from the command line, you can pass -p'
  123' as the flag, but then you can't have single quotes.  You will
also need to escape some special characters passed in from the command
line as a password this way.  Exclamation points (!), question
marks(?), hashmarks (#), adz/amphora (@), and some others will work,
but if you have parentheses, quotes, backticks, or some other
characters, they won't.

An off-the-wall guess could be that everyone expects to have a
space between the parameter value.  If you have a flag that requires
no data between itself and the value, it does break the pattern -
which then forces someone who may not want to read the manual, man
mysql, or check out the --help data prior to jumping in head-first to
discover that there are two ways of performing the action.  And with
that forced lesson, hopefully they'll learn that the prompt is the
safer way of doing this.  Again, though, that's the off-the-wall
possibility.  A Learn or Die ultimatum.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 11:07 AM,  [EMAIL PROTECTED] wrote:
 I'm getting an error trying to run this command:

  root  mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p
  xxx

  ERROR 1046 (3D000) at line 1: No database selected

mysql -D mysql -u xxx -p  mysql_tzinfo_to_sql /usr/share/zoneinfo/America/

The -D flag selects the database `mysql`, which is where the time
zone information belongs.  The  redirect reads from the file
(which, in this case, is actually a redirected STDOUT) into the
database.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 11:36 AM, Tim McDaniel [EMAIL PROTECTED] wrote:
 On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote:
  mysql -D mysql -u xxx -p  mysql_tzinfo_to_sql 
 /usr/share/zoneinfo/America/
  
  The -D flag selects the database `mysql`, which is where the time
   zone information belongs.  The  redirect reads from the file
   (which, in this case, is actually a redirected STDOUT) into the
   database.

  That is not legal shell syntax on UNIXy systems (or CMD.EXE, for that
  matter).   is followed by the input file name, so the command above
  would read a file named mysql_tzinfo_to_sql in the current
  directory.  It does not run the mysql_tzinfo_to_sql command.  The way
  to redirect command output into the input of another command is to use
  | in the proper way.  Please see the on-line man pages that I posted
  in my other note a minute ago.

You're right.  I can't find the pipe character on my Treo 700wx's
keyboard, so I meant to show an alternative method (directing it to a
file and directing the file into MySQL), but must've screwed up and
lost train of thought halfway through.  Odd.

It should've been as follows:

mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ 
/tmp/time_zone_info.sql
mysql -D mysql -u xxx -p  /tmp/time_zone_info.sql

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Migrate HUGE Database

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 2:29 PM, Terry Babbey [EMAIL PROTECTED] wrote:
 Hello,

  I have a huge database that I would like to migrate from a server
  running 4.0.16 to a server running the Windows version 5.0.45. The
  database is approximately 3,500,000 records. I get timeout errors using
  PHPMyAdmin to export the data.

If you have shell access, do the following:

mysqldump -u username -p database_name  database_name.sql

To explain:
-u username  Replace 'username' with the database username.
-p  This signifies that you'll use
a password (at a prompt)
database_nameThe full name of the database to dump
Redirects all output to a
file, deleting previous data, if any
database_name.sql   The SQL output file, written to the
current directory.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 2:58 PM, skills2go
[EMAIL PROTECTED] wrote:

  Hi Folks

  I'm trying to copy a database table form one database to another on a
  different server. Is it possible through myphpadmin, or do I need software?
  If software, do you know of any good programs to do this?

The same question just received an excellent answer from Rolando
Edwards about ten minutes ago.  Check the archive here:

http://marc.info/?l=mysqlm=120517563300467w=2

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 3:26 PM, Tim McDaniel [EMAIL PROTECTED] wrote:
 On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote:
   The same question just received an excellent answer from Rolando
  Edwards about ten minutes ago.  Check the archive here:
  
  
  http://marc.info/?l=mysqlm=120517563300467w=2

  The one missing piece: mysqldump can choose to dump only one or a few
  databases, and if given one database name, can dump only selected
  tables.  http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html:

Good point.  I forgot to mention that.  Thanks, Tim.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Migrate HUGE Database

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 4:05 PM, Terry Babbey [EMAIL PROTECTED] wrote:
 Thanks to all for the quick replies.

  Yes, the mysqldump worked perfectly. Boy do I feel like a newbie now!

  If I use the method below, will that transfer the mysql admin database
  too with the user information?

  Thanks,
  Terry

  nohup mysqldump -hhost of Linux Machine -uusername -ppassword
  --all-databases --routines --triggers | mysql -hhost of Windows
  Machine -A

Yes, the --all-databases flag recursively copies all databases and
tables, including the 'mysql' database with user and time zone
information.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql.time_zone_name

2008-03-06 Thread Daniel Brown
On Thu, Mar 6, 2008 at 10:20 AM, Andre Hübner [EMAIL PROTECTED] wrote:
 Hi List,

  user wants to do:

  SELECT COUNT(*) FROM mysql.time_zone_name;

  problem ist that this table in mysql is empty. I dont know how to fill with
  data. I tried on testmachine with mysql_install_db but it leaves empty.
  Where to get sql-data to fill these tables in mysql-db?

You'll have to have MySQL root access, or an account with access
to write to the database `mysql` for this, but this should help you.

1.) Type mysql_tzinfo_to_sql /usr/share/lib/zoneinfo |
/usr/local/mysql/bin/mysql -p -u root mysql
2.) A bunch of errors may appear, but you can ignore them.
3.) Run SELECT COUNT(*) FROM mysql.time_zone_name; again. You
should have more than 500 rows now.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Using MySQL with its data files on a CD-R (recordable CD)

2008-03-05 Thread Daniel Brown
On Wed, Mar 5, 2008 at 12:13 AM, Michael Hemer [EMAIL PROTECTED] wrote:
 Hi,

  I have been researching to see if it's possible to have a MySQL database 
 with it's data files on a cd-rom, but could use some help to determine if I 
 have found out the full truth of what's possible.  I would appreciate any 
 additional info people have to offer.

The simple answer is yes.  Data is data, regardless of how and
where it's stored.

However, a more truthful answer uncovers some complexities,
including the speed at which the data can be transferred from the CD
(which will be slower than direct access from a hard drive), as well
as the version limitations.  If the MySQL databases on the CD are, for
example, in MySQL 5.x format, but your end-user is still using MySQL
3.23, it's not going to work.  Also, there will need to be some
configuration variables modified on each end-user system so that the
MySQL server knows where to locate the CD databases (and then the
server will need to be restarted, as well).

So to summarize, it can be done, but don't expect it to be a
point-click-send operation; there are going to be some bumps in the
road.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Getting the last item in a group by query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 10:57 AM, Esbach, Brandon
[EMAIL PROTECTED] wrote:
[snip!]
  SELECT
  t.pass, t.id
  FROM
 theTable t
  GROUP BY
 t.serial_number
  ORDER BY
 t.date desc

Try adding the LIMIT keyword.

SELECT t.pass, t.id FROM theTable t GROUP BY t.serial_number ORDER
BY t.date DESC LIMIT 0,1;

That will give only the latest date.


-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Getting the last item in a group by query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 11:24 AM, Esbach, Brandon
[EMAIL PROTECTED] wrote:
 Thanks for the reply,

  Sorry, should have been more specific on that :).
  I need to access the last record by date for each serial_number in the
  table (not just latest record)

Okay, this is untested, so I don't know if it will work
Out-Of-The-Box[tm] or not, but it should at least lead you in the
right direction.  Plus, it's back on-list now, so that others can read
the results in the archives when they search on the web.  ;-)

SELECT t.pass, t.id FROM theTable t WHERE t.serial_number IN
(SELECT DISTINCT serial_number,date FROM theTable ORDER BY date DESC
LIMIT 0,1);

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Getting the last item in a group by query?

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 12:02 PM, Esbach, Brandon
[EMAIL PROTECTED] wrote:
 Hmm didn't notice that replies are sent to personal emails :o!
  I'll look down that avenue once I've completed the mysql version upgrade
  (mysql 4 on my test bench, mysql5 upgrade in progress on the production
  server)

  Thanks again!

Yeah, a lot of the lists now are configured so that you have to
hit Reply-All to post back to the list.  This way, you can have
off-list discussions by simply clicking Reply.

One question are you building a PHP application with that?  If
so, subscribe and send a message over to the PHP-DB list.  It's
well-monitored by some very talented people, and you can get more
specific answers.  http://www.php.net/mailinglists

If not, feel free to ignore this!  ;-P

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-03 Thread Daniel Brown
On Mon, Mar 3, 2008 at 2:01 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:
 hi all, i just installed mysql and started mysqld.

  it suggested i change pw for root, so i did:
  mysqladmin -u root password my_pw;

  but i can't do:
  mysqladmin -u root -h dev.jss.com password my_pw;

  how do i change pw for [EMAIL PROTECTED]

Quickly STFW'ing/RTFM'ing would give you an answer.

One way is to log into the remote host (dev.jss.com) via SSH as
root (or use a control panel such as cPanel).

Another is to use the MySQL client and log in remotely as such:

mysql -h dev.jss.com -u root -p
(Enter the MySQL root password)

Then type the following MySQL queries:

USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
FLUSH PRIVILEGES;

Just be sure to replace 'newpwd' with the password you want to
use.  MySQL's PASSWORD() function will handle hashing the password, so
don't send it encrypted or pre-hashed.

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: change pw

2008-03-03 Thread Daniel Brown
On Mon, Mar 3, 2008 at 2:46 PM, Hiep Nguyen [EMAIL PROTECTED] wrote:

  mysql select user,host,password from mysql.user;
  +--+--+--+
  | user | host | password |
  +--+--+--+
  | root | localhost|  |
  | root | dev.jss.com  |  |
  |  | dev.jss.com  |  |
  |  | localhost|  |
  +--+--+--+
  4 rows in set (0.00 sec)

Okay, I wasn't aware that it's all on the same server.  Try this:

USE mysql;
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE
User='root' AND host='dev.jss.com' LIMIT 1;
FLUSH PRIVILEGES;

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]