Thursday, June 21, 2012


MySQL Issues In Ubuntu

1) To install MySQL, run the following command from a terminal prompt.
sudo apt-get install mysql-server

2) If you need to check whether the MySQL server is running in your machine,  run the following command from a terminal prompt.
sudo netstat -tap | grep mysql

If you get the following reply, it is running.
tcp    0        0     localhost.localdomain:mysql    *:*     LISTEN -


To start the server type below.
sudo /etc/init.d/mysql restart

3) To stop the server type below.
sudo /etc/init.d/mysql stop

4) How to log in to MySQL
mysql -u root -p;



5) How to retrieve users list in mysql
select User from mysql.user;

6) How to create new user account
CREATE USER Ish IDENTIFIED BY PASSWORD 'ish';

7) How to check existing databases
show databases;

8) How to grant all privileges to a user
GRANT ALL ON TEST.* TO 'Ish'@'localhost';

8) How to grant specific privileges to a user
GRANT SELECT,INSERT,UPDATE,DELETE ON TEST.* TO 'Ish'@'localhost';

9) How to log in as a different user
mysql -u USERNAME -p;
(here it will prompt for the password)

Monday, June 4, 2012

Alt+Tab Switcher effect Not Working In Ubuntu

Recently I was met with an issue after taking usual updates in Ubuntu.Normal Alt+Tab behavior would not work as it used to and that made my laptop completely unusable.
After looking through so many forums, I realized many people have faced the same issue.

If you face the same issue, below is how to get rid of it, temporarily.

1)Install Gnome shell in ubuntu 11.10 as below.

sudo apt-get install gnome-shell 

2) Logout from the existing session & select GNOME from the login Screen as below.

 
3) Once you log in you will get below desktop.


4) It will have some nice user friendly environments as below.