My Thoughts & Views

Archive for the ‘MySQL’ Category

1. Install mysql-5.1.31-win32.msi
2. Install mysql-gui-tools-5.0-r16-win32.msi
3. Open Start >Programs >MySQL > MySQL Administrator
4. press control, click on skip
5. Select Startup Variables
6. Select Advanced Networking Tab
7. Under Data /Memory Size check Max.packet size & change 1 M to 100 M
8. Apply Changes

Click to Download MySQL.

SET @rownum := 0;
select @rownum :=@rownum + 1 AS rank,EmpID,EmpName,EmpCity from employeedetails where empname =’kiran’

Carry over a value from previous row.

Yesterday i tried to work on Mysql, but found that the mysql service was not started so i tried to figure it out the problem, i started the service from services mmc in windows xp i encountered an error: “Error 2: the system cannot find the file specified“.

I googled and didn’t find solution to that problem so i decided to find it out by myself.i checked my.ini file and also checked all the files in side bin directory then i found out the solution.
the file name of mysqld-nt.exe was renamed to mysqld-nt.exe~ i renamed it back to its original name and solved the problem. Hope this information is useful to others searching for this problem.

Recently i installed XAMPP in my system to work on a project. I was creating a table with a foreign key in it,then i came to know that InnoDB Engine is not enabled and i tried to find how to enable it but i didn’t get a clear info at one place so i thought i can share it with the rest of the world.

Here are the steps to enable it.

1. go to xampp directory installed in program files and then open mysql\bin folder.

2. Open the file with the name my(my.cnf) in notepad, actually its config file which has an icon of a computer with a globe at the back side.

3. Comment the line


4. Uncomment the following lines

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:/Program Files/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/Program Files/xampp/mysql/data/
#innodb_log_arch_dir = C:/Program Files/xampp/mysql/data/
# You can set .._buffer_pool_size up to 50 – 80 %
# of RAM but beware of setting memory usage too high
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
# Set .._log_file_size to 25 % of buffer pool size
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#set-variable = innodb_lock_wait_timeout=50

5. Save the file and restart the mysql server.

Now you are ready to use InnoDB on your mysql server.

Blog Stats

  • 71,043 hits
August 2020

Top Clicks

  • None