banner
Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Random Tech MySQL
If you appreciate the information found on this website, please drop me a line!

Who's Online

We have 19 guests online
Content View Hits : 1154880
moon and stars
How did you find my site?
 
How often do you answer random online questions?
 

Random Quote

The power of ideas to transform the world is itself accelerating. -Ray Kurzeweil, The Singularity is Near
111_1137
IMG_1241
011_13_001
2010-04-04 10.32.29.jpg

MySQL

Tuesday, 04 September 2007 15:55
MySQL :: Download Connector/Net - go here to get the latest connector for .net mysql access.
MySQL :: MySQL 5.0 Reference Manual :: 2.18.5 Copying MySQL Databases to Another Machine
Real Programmers: How To: Set Up An Ssh Tunnel With Putty (mysql)
SSIS Stuff : Connecting to MySQL from SSIS
maatkit - Project Hosting on Google Code - Maatkit (formerly MySQL Toolkit) contains essential command-line tools for MySQL, such as table checksums, a query profiler, and a visual EXPLAIN tool. It provides missing features such as checking whether slaves have the same data as the master.
MySQL :: Download Connector/ODBC
Download details: SSMA 2008 for MySQL v1.0 CTP1
HeidiSQL - MySQL made easy - a nice gui for mysql.
innotop - The best top clone for MySQL, with special attention paid to InnoDB - Google Project Hosting



Writing MySQL Scripts with Python DB-API


Doing INTERSECT and MINUS in MySQL | Carsten’s Random Ramblings


What version of mysql am I running again?

select version()

Find duplicate rows

SELECT name FROM atable GROUP BY name HAVING COUNT(*) > 1;

Grant all priv to root mysql user.

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost.localdomain' WITH GRANT OPTION;

Getting mysql to work on ubuntu with mysql_config

apt-get install gcc libc6-dev python-dev libmysqlclient15-dev


got a packet bigger than 'max_allowed_packet'

Edit your /etc/my.conf and inside [mysqld] set max_allowed_packet=100M. Restart mysqld. Then to additionally be sure, set the cmd line params on the client ie. 'mysql --max_allowed_packet=100M' Might not want to leave it so high, but it does get past this error.


remember to change that password

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h a.host.com password 'new-password'


Reset your mysql password

mysqld_safe --skip-grant-tables &
Recover MySQL root password [hack] | Ranjith Siji | Programming the Web


Comparing and diffing mysql

An algorithm to find and resolve data differences between MySQL tables at Xaprb
mysql_coldiff
mysqldiff -- a utility for comparing MySQL database structures
Synchronizing Your MySQL Databases Using a Free MySQL Admin Tool - SQLyog — DatabaseJournal.com


Replace data within your table

Sometimes you'd like to replace certain text within your tables...for example here's a query I used to replace all my bad br's...
UPDATE `jos_content` SET introtext = replace(introtext,"<br>","<br/>") WHERE introtext like '%<br>%';


MySQL performance

Optimizing MySQL performance « Sachin’s Weblog
Sample datasets for benchmarking and testing - MySQL Performance Blog


MySQL replication

Live Backups of MySQL Using Replication - O'Reilly Media

"Unable to convert MySQL date/time value to System.DateTime"

When connecting to MySQL from .net connector, you may find you get an error like: "Unable to convert MySQL date/time value to System.DateTime". To handle this, you can fix the offending dates or use a connection string that converts zero (invalid) DateTime to the minimum DateTime value (DateTime.MinValue). To do this, add ";Convert Zero Datetime=True" to the end of your connection string.
How to fix “Unable to convert MySQL date/time value to System.DateTime” exception when using MySQL .NET Connector « George Birbilis @zoomicon
Last Updated on Sunday, 15 January 2012 16:26