Archive for the 'mySQL' Category

mySQL Performance Issue on Remote TCP/IP Connections

mySQL is a performance devil if you’re using it on your localhost or LAN. But using it on internet as a remote storage server is not mean the performance you got will performance you got in your localhost or LAN.

If you want me to sample it with an absolute ratio i can clearly say that if you’re getting 100% performance in your localhost or LAN you’ll get 15% performance while you’re connecting remote mySQL server over tcp/ip.

There is a one configuration that you can increase performance about 5 to 15 percent. That’s to disable name resolving on mySQL. You can do this by adding a line in your mySQL config (my.cnf or my.ini) after [mysqld] line (if you’re using mysqld standart daemon) : skip-name-resolve

You can test it if you want. This will make move your remote connection performance from 15% to 20 to 30%.

But infact this performance increasement will not fit your needs. It’s still so slow for me to use it. Thus please think twice if you’re willing to use mySQL as a remote database server for your client applications. ( Yeah but still it rocks on localhost or LAN )

You can check how mySQL uses DNS resolve from this document. ( Document mirror on focus on code (16KB) )

Simple WinRAR Backup Script for mySQL

net stop mysql
rar a -ag+YYYYMMDDHHMMSS- -rr -r -k -s -m0
      C:\BACKUPS\MYSQL-BACKUP.RAR C:\MYSQL\data
net start mysql

Save three lines as something.bat or autoexec.bat and then use it by Cron Jobs. Output file names like this :

20060808120000-MYSQL-BACKUP.RAR
20060808120001-MYSQL-BACKUP.RAR
20060808120002-MYSQL-BACKUP.RAR

( Before this you can update you path configuration. You can add a line at the end of PATH variable like this : C:\Program Files\WinRAR\ etc.)

mySQL Error Code #1044, Lock Tables Problem

You’ve backuped your database using mysqldump utility. Want to transfer your old database schema to your new database on a new server. But when you try to insert your schema you got an error like this :

#1044 - Access denied for user: 'your_user_name@localhost' to database 'your_database'

Why this error occured?

Continue reading ‘mySQL Error Code #1044, Lock Tables Problem’