RE: MySQL Replication Binary Logs - How Long to Keep?

2006-08-12 Thread Warren Crigger
 Note that you should not just delete the bin logs. Instead 
 use PURGE MASTER LOGS. See 
 http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html
 
 hth,
 mark


Sorry, accidently hit Ctrl/Enter :(

Anyway, I can't purge with that command:

mysql PURGE MASTER LOGS TO 'mysql-bin.023';
ERROR: 
A purgeable log is in use, will not purge

Any ideas?  I'm tempted to just delete but would prefer to do this the right
way, and for some reason it thinks they are in use :/.  I'm showing:


mysql show master status; 
+--+---+--+--+
| File | Position  | Binlog_do_db | Binlog_ignore_db |
+--+---+--+--+
| repl.024 | 110962544 |  |  |
+--+---+--+--+
1 row in set (0.00 sec)

Thanks,
Warren


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



Connection Help - Stupid Question, sorry to bother.

2006-08-12 Thread Sana Farshidi

Hi,
Im sure this is a stupid problem but im a bit confused, and some assistance
would be greatly appreciated.

Im trying to assist with the maintenance/updating of a php site for a school
which uses mysql, and is allready up and running on a remote server.
I have the ftp username and password, and i can access the php/html side of
things no problems, but i want to connect to the mysql database on the
server, and as stupid as it sounds, i have no idea how to go about
connecting.
Ive used mysql before, not very efficiently, but never have had to set it
up, i was always told the program and connection details.

I downloaded a mysql program (enginsite MySql client) and tried to connect
but am not having any luck and have no idea what the port is supposed to
be...

the detail i have are: (of course ive undisclosed the username/passwords)

DOMAIN ACCOUNT DETAILS
Domain Name: www.mhmcindia.org

FTP DETAILS
Host Name / IP Address: 216.67.234.167 or ftp.mhmcindia.org
username: undisclosed
password: undisclosed

and the PHP connects through the script (on the remote server of course)
$host=localhost;
$username=undisclosed;
$password=undisclosed;
$db=undisclosed;

$link = mysql_connect($host, $username,$password)
   or die(Could not connect :  . mysql_error());

mysql_select_db($db) or die(Could not select database);

Is there anyway i can connect to the mysql database with these details? if
so how?

Im sorry for asking seemingly obvious questions, but some assistance would
be greatly appreciated.

Thanks,
Sana


Re: Connection Help - Stupid Question, sorry to bother.

2006-08-12 Thread Chris W
By default MySQL uses port 3306 so you need to be sure that port is open 
on the server, and not blocked by a firewall.  You also need to be sure 
the user you are trying to login as can login remotely.  In the MySQL 
user data base, there is a column for host which is the host that user 
can login from.  If that host says localhost you can only login from the 
localhost.  If it says % you can login from any host.  Also note there 
can be more than one entry for each user all with a different host.  It 
is best to only set it up so you can login from a specific host, that 
makes it more difficult for a hacker to break in. If the user you are 
logging in as is set up just for localhost I would add a user and use 
the host you plan to login from if you can, other wise just change the 
host to % then you can login from anywhere.  Also if you do an update to 
the user table, using the sql update command, you also need to execute 
flush privileges for the changes to take effect.


Sana Farshidi wrote:


Hi,
Im sure this is a stupid problem but im a bit confused, and some 
assistance

would be greatly appreciated.

Im trying to assist with the maintenance/updating of a php site for a 
school

which uses mysql, and is allready up and running on a remote server.
I have the ftp username and password, and i can access the php/html 
side of

things no problems, but i want to connect to the mysql database on the
server, and as stupid as it sounds, i have no idea how to go about
connecting.
Ive used mysql before, not very efficiently, but never have had to set it
up, i was always told the program and connection details.

I downloaded a mysql program (enginsite MySql client) and tried to 
connect

but am not having any luck and have no idea what the port is supposed to
be...

the detail i have are: (of course ive undisclosed the username/passwords)

DOMAIN ACCOUNT DETAILS
Domain Name: www.mhmcindia.org

FTP DETAILS
Host Name / IP Address: 216.67.234.167 or ftp.mhmcindia.org
username: undisclosed
password: undisclosed

and the PHP connects through the script (on the remote server of course)
$host=localhost;
$username=undisclosed;
$password=undisclosed;
$db=undisclosed;

$link = mysql_connect($host, $username,$password)
   or die(Could not connect :  . mysql_error());

mysql_select_db($db) or die(Could not select database);

Is there anyway i can connect to the mysql database with these 
details? if

so how?

Im sorry for asking seemingly obvious questions, but some assistance 
would

be greatly appreciated.

Thanks,
Sana




--
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want  
give the gifts they want
One stop wish list for any gift, 
from anywhere, for any occasion!

http://thewishzone.com


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



Do I really need a subquery?

2006-08-12 Thread Geoffrey Sneddon

Hi,

I've ended up with the following SQL:

SELECT `title`, `url`, COUNT(1) AS  `count`, CEIL(COUNT(1) / (SELECT  
COUNT(1) AS `count` FROM `bi_bookmarks` WHERE `date`  NOW() -  
INTERVAL 86400 SECOND GROUP BY `url` ORDER BY `count` DESC LIMIT 0,  
1) * 8) AS `weight` FROM `bi_bookmarks` WHERE `date`  NOW() -  
INTERVAL 86400 SECOND GROUP BY `url` ORDER BY  `count` DESC LIMIT 0, 10;


Do I really need that subquery? It seems rather pointless having  
similar queries like that. Any other optimisations tips are of course  
welcome (just to note, there are reasons for having the interval in  
seconds).


- Geoffrey Sneddon




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



Re: More than 4 CPUs?

2006-08-12 Thread Miles Teg
If you're using 4 or 8 cpus, I highly recommend considering Solaris 10. 
It's free and it's true threading implementation and fine grained locking 
increase scalability and even out cpu load on multi-cpu systems much better 
than my RHEL 4 U2 (Linux 2.6) systems do.  Their benchmarks back up my 
experiences.  I have 8 4-cpu and 2 8-cpu systems which are dedicated MySQL 
systems.  I am running Solaris 10 on the 8 cpu systems, and I am amazed at 
how well the load balances, and how much faster it is.  All of these systems 
are Opteron dual core.  Two of them (the 8 core systems) are Sun's V40z's, 
the other systems are Supermicro Opterons.


Sun also has some awesome CoolThreads offerings (SPARC architecture), but I 
haven't had a chance to benchmark one yet.  With 32 concurrent threads on a 
single 8 core 4 way threaded cpu, I'd like to see how MySQL's performance is 
on those systems.  Does anyone have any experience with or information about 
CoolThreads systems running MySQL?


Even if you stick to amd64, I think for high end MySQL usage, Solaris 10 is 
the way to go.


- Original Message - 
From: Scott Tanner [EMAIL PROTECTED]

To: mysql@lists.mysql.com
Sent: Friday, August 11, 2006 12:53 PM
Subject: Re: More than 4 CPUs?



 From the articles I've read recently, 8 CPU's seems to be the point
where the scalability ratio starts dropping. See the following articles
for examples:

http://developers.sun.com/solaris/articles/mysql_perf_tune.html
http://corporateclub.mandriva.com/xwiki/bin/download/Main/Technology/mysql-performance-whitepaper.pdf

I know there were some presentations at this years MySQL Conference that
went over this (MySQL Performance Landscape comes to mind). You might be
able to find a presentations on the mysql site.



Regards,
Scott Tanner


On Fri, 2006-08-11 at 14:44 -0400, Ed Pauley II wrote:

It seems like I once read that you don't get any performance gains in
MySQL when you go above 4 CPUs per server. Is this correct? I was
considering a 4 dual-core CPU machine. Should I go with a 2 dual-core
machine instead?
Thanks!

--
Ed Pauley II







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




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



non-text data

2006-08-12 Thread Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem
I use SELECT all from * ... and one row is a gif.

How do I get that gif to appear as a gif and not text?

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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