tag:blogger.com,1999:blog-253660782024-02-20T21:26:20.593+03:00Open MySQL DBADatabase Administrator specialized MySQL.
Topics: mysql tutorial, database design, mysql data types, mysql commands, mysql dump, database development, mysql training, mysql scalability, mysql sharding, mysql performance tuning, mysql tools.Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.comBlogger36125tag:blogger.com,1999:blog-25366078.post-52215663726160056392010-03-31T15:14:00.000+03:002010-03-31T15:14:01.314+03:00vBulletin session table and Hash index in MEMORY EngineIn vBulletin Board System there is session table contains online user information and tracking, in which forum now, what the current URL now, So it is have huge concurrent update statement, By default this table is MEMORY engine because its data not important in case MySQL restart.
I notice early loaded in MySQL and server, So I do full tuning for the server then analyze slow query using Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-34288603640521783262010-03-17T18:08:00.000+03:002010-03-17T18:08:00.432+03:00Is MySQL support Julian Dates?I use it in Oracle and notice there are 10 days missed, for example:
ORCL> select to_date('4/10/1582','dd/mm/yyyy') SHOW_DATE from dual
SHOW_DATE
--------------
04/10/1582
ORCL> select to_date('4/10/1582','dd/mm/yyyy') + 1 SHOW_DATE from dual
SHOW_DATE
--------------
15/10/1582
Say What? the date after 4/10/1582 is 15/10/1582.
But in MySQL i try it but i didn't see this case, example:
Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-63633104078080802812010-02-23T13:51:00.000+03:002010-02-23T13:51:48.525+03:00Can I use latin1 to store utf8 data?I've table contains text column and its charset is latin1, and i can store Arabic text ( and non English character) in this column and retrieve it, i don't know how is it?
So how is that? and why I need utf8?
CREATE TABLE `post` (
`postid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`threadid` int(10) unsigned NOT NULL DEFAULT '0',
`parentid` int(10) unsigned NOT NULL DEFAULT '0',
`Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com8tag:blogger.com,1999:blog-25366078.post-67735227199192126692010-01-10T16:58:00.000+03:002010-01-10T17:05:52.731+03:00Pass application user id to MySQL database??In all our application we connect to MySQL database as single db user, and we need to pass the end user id to the mysql database?
So how can we pass it?
I've idea to create plugin to add mysql variables ex. "app_userid" and set it when user login??!!
but i don't have any idea how to create plugin?
Or do you have another idea??
Note: i don't want to change the application code, and i need it Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-27297115749639228752010-01-06T12:25:00.000+03:002010-01-06T12:25:24.971+03:00First look to Chromium, Google Chrome OSI download the binary version of Chrome OS from here, and plug it to VMware.
New thing:
the OS login is attach with Google account, so you cannot login if you havn't Google account or no internet connection, and i don't know how you can configure the internet connection.
Its very simple and the UI like Google Chrome browser.
User interface
Design goals for Google Chrome OS's user interface Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com2tag:blogger.com,1999:blog-25366078.post-81225346830193482012010-01-03T14:02:00.000+03:002010-01-03T14:02:17.205+03:00Help MySQL to still freeThere's a campaign started by Monty Widenius to save MySQL from the evil clutches of Oracle. You can read about it here.
http://helpmysql.orgMohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-88610074699367376512009-10-01T11:17:00.004+03:002010-03-31T16:07:25.582+03:00Update: Find Query Per certain SecondsIn my old post there is a bug when run in MySQL 5.1.30 and old, because the status variable Queries was added in MySQL 5.1.31. So i change to choose between Queries and Questions status variables, and I think the Queries represent more accurate result.
http://forge.mysql.com/tools/tool.php?id=217
By the way:
# Queries
The number of statements executed by the server. This variable includes Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-10255719550086329602009-09-28T12:35:00.004+03:002009-09-28T16:21:07.893+03:00Palestinians storm foiled by Jews of the Far East after violent confrontations on the eve of Eid «forgiveness»Translated via Google Translate from herePalestinians storm foiled by Jews of the Far East after violent confrontations on the eve of Eid «forgiveness» 9 injured members of the Israeli police... And 40 Palestinians Palestinian flying victory sign to a group of Israeli police officers after clashes broke out yesterday in the Al-Aqsa Mosque between Palestinians and Jewish extremists (a. B) Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-8998152839790612002009-09-28T12:18:00.002+03:002009-09-28T12:57:09.998+03:00Why does Google have two L's today?Why does Google have two Ls today? If you happen to be also one of the many internet users that are wondering why Google decided to have their logo, or as they call it, “doodle” spelt with 2 l’s, then you’ve come to the right place.Actually the 2L’s are number 11 as it is Google’s 11th birthday, after being founded in September 1998. It will be celebrated in each time zone when it officially Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-44877891142485288902009-08-26T14:51:00.001+03:002009-08-26T15:01:30.489+03:00Yahoo! Acquires Maktoob The Largest Arab Portal!Yesterday Yahoo! announced to Acquires Maktoob.Maktoob.com is a leading Web community portal offering online communications tools and information services that empower Arab Internet users. With a diverse audience covering the whole Arabicspeaking region in the Middle East and North Africa (MENA), Maktoob combines a wide array of quality aggregated content with the latest Web 2.0 services to Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-68123598847481220292009-07-30T17:32:00.004+03:002009-10-01T11:21:59.001+03:00Find Query Per certain SecondsDo you need to find qps for peak hours not avg qps through mysql life.
The MySQL 5.1 offers new GLOBAL_STATUS information schema tables. These can be used to report certain performance metrics, such as the number of queries processed per certain seconds, NOT overall avg queries per second, Its good to know how much qps in peak hours.
http://forge.mysql.com/tools/tool.php?id=217Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-85545509699748585802009-07-09T16:53:00.000+03:002009-08-05T16:57:06.791+03:00Threads with "freeing items", "Sending data" and "Locked" never finishIn one of the servers we have an issue that happens to one of the servers that some itemsthat have the status of "freeing items" and "Sending data" are just stuck there, causing alot of locks on the server, and the load of the server drops to almost 0.The server then wouldn't restart, and the only solution is to kill the mysqld process, andfix the crashed tables that result from the kill.How to Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-19029893015691576702009-06-16T12:58:00.012+03:002009-06-16T14:50:11.690+03:00InnoDB tablespace, single Vs. multiple, and InnoDB defragmentThe ibdata file is too big 10GB, and actually we've only about 2GB (data+index) in innodb storage engine.How we can defragment this file and reduce it?How is this happened?By default the ibdata file created initially by (innodb_data_file_path = ibdata1:10M:autoextend) and auto extended by (innodb_autoextend_increment = 8MB) when it’s needed, and this file (tablespace) contain all innodb tables (Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-67041830914325917042009-06-04T11:38:00.004+03:002009-08-05T16:56:19.844+03:00vBulletin, session table is InnoDBIn large vBulletin forum we had strange problem in memory table "session", we've 25M post, 1.7M user, 20K online user.So we change engine of session table to InnoDB and set configuration of innoDB as follow (be careful this configuration is not proper for other tables because this is good in performance but bad in crash and recovery, and data reliability)innodb_data_home_dir = /dev/shm/mysql/Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-26228591285707857442009-04-20T16:27:00.003+03:002009-08-05T16:56:19.844+03:00Oracle to Buy Sun !!!Sun and Oracle today announced a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The Sun Board of Directors has unanimously approved the transaction. It is anticipated to close this summer.What will happened in MySQL, JAVA.I think its enough.http://www.sun.com/aboutsun/pr/2009-04/sunflash.20090420.1.xmlMohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-10403406765916057382009-04-15T11:43:00.001+03:002009-08-05T16:57:06.791+03:00Warning Aborted connection, log_warnings and wait_timeoutIn my server error log i see090415 10:55:57 [Warning] Aborted connection 481 to db: 'db' user: 'user' host: 'localhost' (Got timeout reading communication packets)090415 10:56:16 [Warning] Aborted connection 582 to db: 'db' user: 'user' host: 'localhost' (Got timeout reading communication packets)090415 11:05:13 [Warning] Aborted connection 2693 to db: 'db' user: 'root' host: 'localhost' (Got Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-57188633220193342622009-04-12T12:56:00.006+03:002009-08-05T16:56:19.845+03:00mysqlsla amazing toolmysqlsla is interesting tool to analyze slow log query, aggregate same query in one and generate unique sql statement withCount, (max, min, avg) execute time, lock time, Rows sent, Rows examined for each unique one.you can use it to review indexes and drop unused index, and create another.Report for slow logs: slowquery1day.txt791 queries total, 85 uniqueSorted by 't_sum'Grand Totals: Time 23.05kMohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-51245839043231696942009-04-08T15:19:00.003+03:002009-08-05T16:56:19.845+03:00A Brief Introduction to MySQL Performance TuningHere are some common performance tuning concepts that I frequently run into. Please note that this really is only a basic introduction to performance tuning. For more in-depth tuning, it strongly depends on your systems, data and usage. Server Variables For tuning InnoDB performance, your primary variable is innodb_buffer_pool_size. This is the chunk of memory that InnoDB uses for caching data, Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-28162473085774656062009-04-08T15:15:00.003+03:002009-04-12T13:22:59.744+03:00Upgrading MySQL with minimal downtime through ReplicationProblem With the release of MySQL 5.1, many DBAs are going to be scheduling downtime to upgrade their MySQL Server. As with all upgrades between major version numbers, it requires one of two upgrade paths: Dump/reload: The safest method of upgrading, but it takes out your server for quite some time, especially if you have a large data set.mysql_upgrade: A much faster method, but it can still be Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-88227151074104096712007-02-20T14:29:00.000+03:002009-08-05T16:57:06.792+03:00How to play Real audio and video files (*.rm) with Windows Media player!?<!--emo&:blink:--><!--endemo-->How to play Real audio and video files (*.rm) with Windows Media player!? Because of competition between Microsoft and Real Networks, Windows Media Player does not support Real audio and video files, and real networks does not release any patch for WMP. But, Real has released a patch for other media players.Now, I want learn you, how you can use this patch to play Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-48365806497324068542007-01-13T17:20:00.000+03:002009-08-05T16:57:06.792+03:00Convert Flash Video (.flv) to AVI (.avi) or MPEG (.mpg) - lifehack.orgConvert Flash Video (.flv) to AVI (.avi) or MPEG (.mpg) - lifehack.org: "Convert Flash Video (.flv) to AVI (.avi) or MPEG (.mpg)Hitrec at VideoHelp forum introduces a software called RivaFLVencoder which able you to convert .flv files (Flash Video) into avi and mpg files. This is extremely useful when you download youtube or google videos and you don’t like it play in flv player. With this Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-71028555354637650482007-01-13T17:14:00.000+03:002009-08-05T16:57:06.792+03:00How to Download Google Video - lifehack.orgHow to Download Google Video Okay, it is just not fun to play video online with slow Internet connection - to have smooth video playback, the best way it is still downloading the whole clip locally and playback. However Google Video does not provide a link for one to download. The movie is played by Google Video Player, which is Online Flash FLV player. New Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com1tag:blogger.com,1999:blog-25366078.post-74462596094285221192006-12-20T17:06:00.000+03:002009-08-05T16:57:06.792+03:00How to plug JInitiator to Firefox...I can run Oracle Forms on Mozilla Firefox.1- Install JInitiator.2- C:\Program Files\Oracle\JInitiator 1.1.8.19\bin\NPJinitXXXX.dll --XXXX = Version.3- Paste it under this directory of Firefox(C:\Program Files\Mozilla Firefox\plugins).4- Restart Firefox.Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com4tag:blogger.com,1999:blog-25366078.post-65480866856168767552006-12-06T17:11:00.003+03:002009-08-05T16:57:06.793+03:00How to Disable Windows Login ScreensaverHow to Disable Windows Login Screensaver Have you ever been annoyed by the computer going into a screensaver before you've even logged in to it? This is a step-by-step guide to disabling this feature. Steps Login to your computer as an amdinistrator account. Go to Start->Run Type regedit into the text box Navigate in the explorer like window to the section: HKEY_USERS -> .DEFAULT -> CONTROL Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0tag:blogger.com,1999:blog-25366078.post-39967055046502558342006-12-06T17:11:00.001+03:002009-08-05T16:57:06.793+03:00How to Use Windows XP Built in Remote Desktop UtilityHow to Use Windows XP Built in Remote Desktop Utility This explains how to connect to another computer on your local network through Windows XP's built-in remote desktop utility. Steps Remote Desktop must be enabled on all the computers to which you wish to connect. To ensure that it is enabled, follow these steps: Right click the My Computer icon on your desktop or start menu and click Mohammad Lahlouhhttp://www.blogger.com/profile/10954528679518223744noreply@blogger.com0