Feeds:
Posts
Comments

Archive for the ‘Uncategorized’ Category

Greetings!

To access MySQL db from terminal it is necessary to give its root password

Since i forgot its root password, i ended up with the following error

Error:

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’

(using password: NO)

Then i followed the below steps to reset it

Steps:

1. [root@venus ~]# service mysqld stop

Stopping mysqld: [ OK ]

2. [root@venus ~]# mysqld_safe –skip-grant-tables & [1] 3735

3. [root@venus ~]# 110809 10:43:22 mysqld_safe Logging to ‘/var/log/mysqld.log’. 110809 10:43:22 mysqld_safe

Starting mysqld daemon with databases from /var/lib/mysql

4. [root@venus ~]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.1.56 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

5. mysql> UPDATE user SET password=PASSWORD(“slash123″)WHERE user=”root”;

ERROR 1046 (3D000): No database selected

( Note: Here “slash123” is my mysql root password )

6. mysql> show databases;

+——————–+
| Database |
+——————–+
| information_schema |
| django |
| drupal |
| mysql |
| student |
| test |
+——————–+
6 rows in set (0.34 sec)

7. mysql> use mysql;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with –

A Database changed

8. mysql> UPDATE user SET password=PASSWORD(“slash123″)WHERE user=”root”;

Query OK, 3 rows affected (1.07 sec) Rows matched: 3 Changed: 3 Warnings: 0

9. mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

10. mysql> quit Bye

11. [rajee@venus ~]$ mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.1.56 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

That’s it 🙂

Now i am able to access MySQL prompt from the terminal

Advertisements

Read Full Post »

Hai, today i faced a mysql connection problem while logging in to mysql prompt from the terminal

I am running on Fedora 14

Here i posted the error and its solution

Error:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Solution:

To solve the above error, it is necessary to start The MySQL Server – mysqld 

Start MySQL server:

As a root user, start the mysql server

service mysqld start

Stop MySQL server:

As a root user, stop the mysql server

service mysqld stop

Note: The file mysql.sock is automatically created when the MySQL server ( mysqld ) runs, otherwise it is not.

Read Full Post »

Hai, though i am 70% confirmed in using GNOME environment, but bit doubtful regarding, “Whether iam using Gnome or Kde desktop environment in Fedora 14”

To check it, did a bit surfing and confirmed with GNOME.

You can verify it using gui or terminal

Using GUI:

On Fedora, form the top panel click on  System -> About this Computer. Now you can see GNOME or KDE with its version number

On Ubuntu, you can find directly as System -> About GNOME or System -> About KDE

Using Terminal:

Type the following command in the terminal.

echo $DESKTOP_SESSION 

You can see the output as gnome (if gnome present) or kde (if kde present)

Click here for the source 🙂

 

 

Read Full Post »

To extract the rar format files on Fedora 14, as a root user type the following commands

Install free and non free yum repositories

rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Install unrar

yum install unrar

Read Full Post »

Hai, today i learnt how to create a curved border using CSS (Cascading Style Sheet)

It is accomplised using border-radius

I just tried a simple example to know how it works

There are other properties such as border-top-left-radius, border-top-right-radius, border-bottom-left-radius, border-bottom-right-radius to set all the corners

HTML file


<html>
<head>
<link rel="stylesheet" type="text/css" href="example.css" />
</head>
<body>
<div id="first">
<p>Paragraph</p>
</div>
</body>
</html>

Example.css


#first {

border:5px solid red;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;

}

Read Full Post »

Greetings!

I was working with an application ( sample app ) from Learn Rails by Example

It uses Git Version Control System to track the changes of code.

I had a master branch and a sub-branch ( sign-in-out )

After checkout from the master branch,

[rajee@localhost sample_app]$ git checkout master

Switched to branch ‘master’

I tried to merge the sub-branch ( sign-in-out ) into master.

[rajee@localhost sample_app]$ git merge sign-in-out

But i received the following error

Error

Updating 77e2668..3db6c58
error: Your local changes to the following files would be overwritten by merge:
webrat.log
Please, commit your changes or stash them before you can merge.
Aborting

Then i googled and found a link http://stackoverflow.com/questions/1291459/to-git-checkout-without-overwriting-data to solve it.

After reading the link, i found git stash command will solve my error.

Then i looked for git stash manual page to know what it is.

Solution

[rajee@localhost sample_app]$ git stash
Saved working directory and index state WIP on master: 77e2668 Finished user signup
HEAD is now at 77e2668 Finished user signup

Now issuing merge command

[rajee@localhost sample_app]$ git merge sign-in-out
Updating 77e2668..3db6c58
Fast-forward
app/controllers/application_controller.rb    |    1 +
app/controllers/sessions_controller.rb       |   25 +

..

Wow…It worked 🙂 🙂

Read Full Post »

Hai,

Today i received a mail regarding a screencast done by bala and posted to kanchilug mailing list.

It is approximately 11 minute tutorial.

From this video i learnt on

  • Handling folders in number of tabs
  • Changing the background inside a file browser
  • To view the current location
  • Shortcut keys for minimizing/closing the windows, enlarging/decreasing the folder sizes etc.

I have fedora 14 on my system.

Though this video showcased Ubuntu features, it works in fedora too.

And one more unique feature is, it is done in our mother tongue, Tamil 🙂

Here’s the screencast



Thanks a lot to Bala.

Read Full Post »

Older Posts »