When you run mysqldump , by default it will not export your procedures or function , if you want to include these info , you need to add –routines option in your mysqldump command. mysqldump —routines > outputfile.sql Let’s assume we want to backup ONLY the stored procedures and triggers and not the mysql tables and data (this can be useful to import these in another db/server that has already the data but not the stored procedures and/or triggers), then we should run something like: mysqldump –routines –no-create-info –no-data –no-create-db –skip-opt > outputfile.sql and this will save only the procedures/functions/triggers of the . If you need toRead More →

error_reporting = E_ALL & ~E_NOTICE => PHP will stop if we have any error related to E_DEPRECATED , it may not show you any warning – very silent – different to debug , this is when we use some old function. error_reporting = EALL & ~E_NOTICE & ~ E_DEPRECATED => it will skip the error and let you continue to run.Read More →

There are 3 commands that we can use sar top mpstats You may need to install sysstat package to use these commands : apt-get install sysstat If you install sysstat , enable systat by edit: nano /etc/default/sysstat    -> change ENABLE from false to true.Read More →

My OS crash today and i had to reinstall mysql server. I am using Windows 2003 (quite old  😉 There are a few things happen when i reinstall the mysql , and it happens at the “instance” configuration step. Canot find my-template.ini , => Fix: copy my-template.ini to bin/ directory Can not start service It’s because the mysql path in Services is not correct : C:\Program Files\MySQL\MySQL Cluster 5.5\bin\bin\mysqld” –defaults-file=”H:\Program Files\MySQL\MySQL Cluster 5.5\bin\my.ini”  MySQL => open registry , go to HKLM \ System\Current Control Set1\ Services Locate mysql , and update the path => Try to restart , if you still can not start itRead More →

Svnx doesnt have interface to switch the svn repository from one url to another. If you change your url , or move your repository to a new url you can do this. Open the terminal Using “cd” command to go to your repsoitory , e.g. cd /Users/yourname/websites/abc.com (abc.is your svn) then run the command svn switch –relocate old_url new_url if you want to check your old url , you can run the command “svn info”Read More →

DriverIdentifier is a desktop/webapp hybrid—install the program then launch it to scan your system for all device drivers then the program checks to see if there are new drivers available for your hardware on the web and these results are displayed in a browser tab. Any needed driver updates can be directly installed by clicking on the Update link. The program is relatively straightforward. Running it on my Lenovo laptop resulted in a handful of drivers that need updates such as my webcam, graphics card, and SATA controller. Clicking on the update link takes you to a page with several mirror sites from which youRead More →

Today, my server is out of disk and i see there are lot of files in /tmp , their names are phpXXXX , i know these  files are uploaded by PHP, but why they are not deleted after the scripts end. After a lot of troubleshooting , i found that there is some errors in my apache error log with “child process exit , filesize limit…” i did some research , and found that it’s because apache can not  work with file larger than 2GB , i searched though my file system and saw there are some of my application logs files generated files atRead More →

When you think your mysql is slow , the first step is to analyze your sql query with “Exlain” command. This is an example explain select * from table1 inner join table2 on table1.field1=table2.field2 and table.field3 =577458498 It will give you some thing like this , look at the “rows” column , if the number of that column is too high, try to reduce it by changing your query , or add index. +——–+——+——————-+———+———+——-+——+———–+ |table | type | possible_keys | key | key_len | ref | rows |Extra | +——–+——+——————-+———+———+——-+——+———–+ |employee| ref | surname,surname_2 | surname | 41 | const | 1 |where used |Read More →