Tag: mysql | Tutorial Depot

MySQL and UTF-8

April 4, 2012 at 4:33 pm Tags: | |

www.phpwact.orgA great list of MySQL functions to work with utf-8 encoding, this article offers all the information you need! While utf-8 is mostly used for database driven websites, is the default encoding used by MySQL still “latin1_swedish_ci”. If you forget to change the collation while creating databases and tables you need to change field types afterwards and maybe you need to re-import your data.

Source…

How to Fix MySQL Database (MyISAM / InnoDB)

November 18, 2011 at 9:20 am Tags: | |

www.softwareprojects.comThis is a great MySQL 101! Recently I got several problems with a few MySQL databases because the server wasn’t able to write to the SAN storage. I found this page and the command ” /usr/local/mysql/bin/mysqlcheck –all-databases -uUSERNAME -pPASSWORD -r” fixed all the corrupt tables. Sure it took some time to check/repair all the tables, but the work need to be done. One hint, before you start repairing, you should search for the location of the MySQL binaries (use “locate mysqlcheck” for example) otherwise it will not work. You need to have MySQL ROOT access for many functions mentioned on this page.

Source…

Optimize your MySQL Server with MySQLTuner

February 13, 2011 at 2:07 pm Tags: | |

Login to your server’s console and download MySQLTuner (I use my user’s home directory)


wget mysqltuner.pl

Optional
If you don’t like to enter the user details for every test it’s possible to create a .my.cnf file in the same directory and add a mysql admin user to access your database

Use this kind of settings:

[client]
user=mysqladminuser
password=dbpassword
Read More…

PHP: Fast and easy SQL queries using ezSQL

November 7, 2010 at 10:21 am Tags: | | | | |

www.catswhocode.comGreat article about using a database abstraction layer! I like EZ a lot, they have great classes, but more interesting is the discussion about PDO (check the comments). Last time I checked PDO, most of the PDO drivers were in an early development stadium. Now it’s possible to use IBM, postgres,… the big ones like Microsoft SQL and Oracle are still experimental :(

Source…