Welcome To Snipplr


Everyone's Recent Snippets Tagged mysql



Where bad_table is the name of the table containing duplicate rows.
2 423 posted 15 years ago by jdbartlett
3 707 posted 15 years ago by benphelps
Been wanting to made one of these for a while and finally I got round to it. For some examples please visit the post: http://www.dom111.co.uk/blog/coding/db/8 Any comments suggestions appreciated. CreativeCommons ShareAlike
3 1132 posted 15 years ago by dom111
This is useful if you are changing a Drupal site's file upload path and/or changing from a private to a public file store.
3 1430 posted 15 years ago by shrop
1. Allows encryption between client and server 2. Bypasses filtered port, if any on the standard port for the given service.
1 682 posted 15 years ago by iblis
When installing mysql and mysql-dev with fink, gem is unable to find the mysql headers and libraries: you should specify their location. If compiled manually from source, gem will find it if /usr/local/mysql (or what ever other location you specified...
0 564 posted 15 years ago by iblis
Imports data from CSV (excel-compatible format) into MySQL. Also check the mysqlimport utility and the complementary SELECT ... INTO OUTFILE.
4 881 posted 15 years ago by jarnaldich
This will create and then populate a MySQL table with a list of the names and USPS abbreviations for US states and possessions in existence.
3 2595 posted 15 years ago by cbrant
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 1334 posted 15 years ago by cbrant
0 663 posted 15 years ago by mikegreen
I deleted the old one by accident trying to edit it.
9 1087 posted 15 years ago by mattkenefick
1 640 posted 15 years ago by mikegreen
Expands a MySQL / Gzipped file and executes it's queries.
0 658 posted 15 years ago by mattkenefick
Gets the present time and date in PHP and formats it for input into a MYSQL database DATETIME field
1 438 posted 15 years ago by TimFletcher
1 692 posted 15 years ago by stancell
0 445 posted 15 years ago by estebant
You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
0 847 posted 15 years ago by zingo
1 744 posted 15 years ago by tclancy
To grant all privileges to a user from any location login to the mysql shell and run the following queries.
3 637 posted 15 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1 636 posted 15 years ago by cbrant
Wenn ein INSERT einen doppelten Wert erzeugen würde, wird das UPDATE ausgeführt.
1 476 posted 15 years ago by drk
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9 705 posted 16 years ago by chrisaiv
4 779 posted 16 years ago by mswallace
MySQL backup and restore example through mysqldump / mysql command line utilities.
3 604 posted 16 years ago by jarnaldich
0 523 posted 16 years ago by eszpee
PHP function that creates a mySQL INSERT statement for mime types. Type are extracted from a text file.
0 637 posted 16 years ago by fabian
It does not show the grants themselves, but shows all users with grants.
0 611 posted 16 years ago by therobot
This script removes (DROPS) all tables that start with foo_. Usefull if you had some CMS or application that (ab)uses table prefixing, and want to clean 0ut your database. NOTE: the data is remove FOREVER! So take good casre: make backups and all...
2 812 posted 16 years ago by berkes