Mysql Error: too many open files

# error: ERROR 1018 (HY000): Can’t read dir of ‘.’ (errno: 24)

# Super user
$ sudo su

# See what mysql files are open
$ lsof -u mysql

# Count how many mysql files are open
$ lsof -u mysql | wc -l

# close mysql files
$ kill -9 `lsof -t -u mysql`

# sources

Fixing ethernet network connection

Issue: When plugin in the Ethernet cable to computer would be not have a connection.
Reason: Ethernet driver is not installed, corrupted or out of date.
motherboard: Asus z97-AR
Intel CPU: Intel Core i7-4790K
operating system: Window 7

Go to device manager.
Under ‘Other devices’ the Ethernet Controller has a warning icon

donwload then extract ‘Turbo LAN V1.04.01 for Windows 7/8/8.1 32bit & 64bit.’ driver from asus site

In device manager right click on ‘Ethernet Controller’ then ‘Update Driver Software’ then ‘browse my computer for driver software’
Browse to the extracted folder ‘Intel_LAN_Win7-8-8-1_VER191510’ then click next

Restart computer

Corrupted dpkg status file fix

Today I was trying to install a program using apt-get install however I kept getting this error

Do you want to continue [Y/n]? Y
Selecting previously unselected package libxmlrpc-core-c3.
(Reading database … 60%dpkg: unrecoverable fatal error, aborting:
reading files list for package ‘intltool-debian’: Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

after hours of research I found out that the reason for this error was the /var/lib/dpkg/status file was corrupted.

I had three options to fix this which were reinstall ubuntu operating system, edit the status files or find a backup status file. I didn’t want to reinstall my operating system so I tried the other two.

(warning: Before trying to edit any file make sure you make a back up of it)

I tried to edit the status file by looking for the package I was trying to install. However I couldn’t find it and I didn’t know what to delete. Luckly there’s dpkg status backupfiles in your system located at /var/backups. I found one that was created a month ago called dpkg.status.3.gz and extracted it and renamed the file status and put into /var/lib/dpkg directory.

Then I tried to install the program using apt-get install and it worked.

XAMPP troubleshoot

XAMPP on linux ubuntu stopped working I belive it was because I
ran the python barebones server script. While XAMPP was running I
would go to http://localhost and the page wouldn’t load. So I tried
to restart xamp
$ sudo opt/lampp/lampp restart

I received this error message

(20014)Internal error: Error retrieving pid file logs/
Remove it before continuing if it is corrupted.

so I deleted the logs/ file, restarted LAMPP and it started to work again

troubleshoot, linux ubunut

>Installing Kdiff3 version control mergetool for Git

>kdiff3 is a great GUI mergetool for git. However the installation is more tedious in Windows compared to Linux. Below is instruction on how to install it in Windows.

Download and install program:

Add kdiff3 as your Git mergetool
From Git Bash, run
$ git config –global merge.tool kdiff3

Open the file repository/.git/config
and paste the code below

    tool = kdiff3
[mergetool "kdiff3"]    
    path = C:/Program Files/KDiff3/kdiff3.exe    
    keepBackup = false    
    trustExitCode = false

git mergetool kdiff3 windows
kdiff3 mergetool is not available
better than vimdiff

>Linux: Launching a program from Terminal

>In linux there’re couple different methods to install a program. The most often used and easy is apt-get because it does all the work. All it is a line in the terminal like:
$ sudo apt-get install terminator
and the program will install.

Programs like XAMPP where the package needs to be downloaded and extracted to a specific location. Other programs like netbeans and Komodo Edit where the package is first downloaded then extracted and then run an install script.

Sometimes I like to launch a program using the terminal such as:
$ terminator

When you install netbeans it doesn’t give you this feature but I going to show you how to create it.

When netbeans is installed it creates a netbeans folder in your home directory. There you will find a netbeans executable file (~/netbeans-7.1/bin/netbeans). If you run this file it will launch the program. What we need is to put this file symbolic link (symlink) inside the directory that holds these other executable programs which is /usr/local/bin. You do this by
$ sudo ln -s ~/netbeans-7.1/bin/netbeans /usr/local/bin/netbeans

that’s it!

Now netbeans may give you an error stating that you do not have permission to write in ~/.netbeans/ What is needed here is to change the permission with chmod. I gave it full access by running
$ sudo chmod -R 777 ~/.netbeans/

now you should be able to open the terminal, type netbeans and the program will launch

command line

Fixing the internet in Ubuntu using driver BCM4312 802.11b/g LP-PHY

What a pain! I recently reinstalled Ubuntu 11.10 on my Dell Latitude D630 and wireless wasn’t working. It wasn’t picking up any connections. My driver BCM4312 802.11b/g LP-PHY for some reason wasn’t installed and when I went to Ubuntu “System settings->Additional Drives” and tried to activate the Broadcom STA wireless driver I would get an error to check /var/log/ folder that didn’t exist.

So I connect to the internet using a wire connection and ran this in the terminal

$ sudo apt-get install b43-fwcutter

rebooted the computer then went back to “System settings->Additional Drives” tried to activate the driver again and it worked.

In Ubuntu 13.04
went to “additional drivers” while connect to the internet using wired connections selected the installed driver and clicked on “Apply Changes” and let it install.



>Watch and Transfer videos to PS3 using a Flash Drive or Hard Drive

>Do you want to watch videos on you Play Station 3? Do you want to transfer movies from computer to PlayStation 3? Below are the instructions using a flash drive/hard drive

Make sure the flash drive or hard drive is formatted to FAT32. Create a folder inside the flash drive / hard drive named VIDEO (must be all caps). Put your videos inside this folder (h264, AVI…).

In PS3:
Navigate to the video. Select the flash drive or hard drive then select the video.

How to Fix it. IPhone sound stop working

If your IPhone or Ipod Touch internal sound stop working, the volume control is non-responsive and the sound meter does not appear. Below is what you need to do.

On the top of your device there is a small button. Click and hold it, then slide to power off and turn it back on. This reboots your device and the mic will work again.

If you get the white screen of death.  Just click and hold both the small button on the top and the home button for ten seconds and it will reboot.