Mysql user creation / setting up a MySQL new user account
When you try to access MySQL database server from client such as mysql or even a programming language such as php or perl you need a user account.
  • MySQL has sophisticated user management system that controls who can access server and from which client system.
  • It uses special tables in a mysql database.
In order to create a new user account you need:
  1. a MySQL root account password.
  2. Next you need to use the GRANT SQL command to set up the MySQL user account.
  3. Finally, use the account's name and password to make connections to the MySQL server.
    *Note* that MySQL user accounts are different from UNIX/Linux login accounts even if they may have the same names.
Procedure for setting up a MySQL user account:

Login in as mysql root user (at shell prompt type following command:):
$ mysql -u root -p OR $ mysql -u root -h -p
Create a new mysql database called demo mysql> CREATE DATABASE demo; Create a new user called user1 for database demo mysql> GRANT ALL ON demo.* TO user1@localhost IDENTIFIED BY 'mypassword';

Note: GRANT ALL means all privileges i.e. user is permitted do anything. She can read, modify or delete data, but only on tables in the demo database. She cannot access any other database. How do I connect to MySQL server using user1 account? User user1 can connect to mysql server demo database using following command: $ mysql -u user1 -p demo OR $ mysql -u user1 -h -p demo Where, -u user1: MySQL Username -h : MySQL server name (default is localhost) -p : Prompt for password demo: demo is name of mysql database (optional)

What is MySQL?
MySQL is open source database server. It is reliable and widely used by web developers around the world. You can use PHP or Perl scripting to access a MySQL database. However, thousands of ready to use application available for MySQL, here is some of the most popular application (written in PHP [PHP (Hypertext Preprocessor), which is a general-purpose scripting language that is especially suited for web development and can be embedded into HTML]):
  1. Guestbook software Advanced Guestbook
  2. Forum software: phpBB, Simple Machines Forum (SMF)
  3. Content management system: Mambo, Xoops, PostNuke
  4. Blog software: Wordpress, Geeklog, pLog, Serendipity
  5. Photo Gallery: Coppermine Photo Gallery, 4images
Once you are, experienced user, you may also use MySQL to create dynamic web pages or software(s) for yourself. For more information see:
MySQL Web site
PHP web site

The Best cms, most flexible, and open source CMS software
According to wikipedia "A content management system (CMS) is a computer software system for organizing and facilitating collaborative creation of documents and other content. A content management system is frequently a web application used for managing websites and web content, though in many cases, content management systems require special client software for editing and constructing articles. The market for content management systems remains fragmented, with many open-source and proprietary solutions available." Most CMS systems are written in PHP/Perl and MySQL database software. Here are most notable open source content management systems:
  1. Drupal
  2. Xoops
  3. Mambo
  4. PostNuke

- For more information and in depth comparisons of CMS see:
- You can try various open source CMS software before install. Includes both admin and user page access.
- You can discuss, rate, and compare the various CMS software systems available on the market today including open source CMS systems.

MySQL Change root Password
Q. How do I change MySQL root password under Linux,
A. FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session? Setting up mysql password is one of the essential tasks. By default root user is MySQL admin account.
*Note* that the Linux / UNIX login root account for your operating system and MySQL root are different. They are separate and nothing to do with each other (indeed some admin removes root account and setup admin as mysql super user).
mysqladmin command to change root password
If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows: $ mysqladmin -u root password NEWPASSWORD However, if you want to change (or update) a root password, then you need to use following command $ mysqladmin -u root -p'oldpassword' password newpass For example, If old password is abc, and set new password to 123456, enter: $ mysqladmin -u root -p'abc' password '123456'
Change MySQL password for other user
To change a normal user password you need to type (let us assume you would like to change password for vivek): $ mysqladmin -u vivek -p oldpassword password newpass
Changing MySQL root user password using MySQL sql command
This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek: 1) Login to mysql server, type following command at shell prompt: $ mysql -u root -p 2) Use mysql database (type command at mysql> prompt): mysql> use mysql; 3) Change password for user vivek: mysql> update user set password=PASSWORD("NEWPASSWORD") where User='vivek'; 4) Reload privileges: mysql> flush privileges;
See also:
mysql> quit This method you need to use while using PHP or Perl scripting.

How do I find out screen resolution of my Linux desktop?
It refers to the clarity of an image on screen. Screen resolution suggests the number of dots or pixels on the entire computer screen. For example, when you say a 640 x 480 screen resolution then you are refering to is 640 individual dots on each of 480 lines i.e. 307K pixels.

Use xdpyinfo command to find out current screen resolution:
$ xdpyinfo | grep 'dimensions:'

dimensions: 800x600 pixels (283x212 millimeters)
You can also use xrandr command: $ xrandr | grep '*' *0 1024 x 768 ( 283mm x 212mm ) *61
You can also use Desktop tools to find out current desktop screen resolution:
(A) Gnome Desktop

  1. Click Gnome Desktop menu > Preferences > Screen resolution

(B) KDE Desktop
  1. Click on K desktop Icon > Select Control Center
  2. Select Peripherals (under Index tab) > Select Display
  3. It will display Screen resolution or size

Server uptime command - how long the system has been running
You would like to find out how long the system has been running. Linux and UNIX comes with various command to find out server uptime command. Under Linux file /proc/uptime has uptime information, /var/run/utmp has information about who is currently logged on. However, information from /proc or utmp file is not directly readable by humans so we use following commands: Uptime command $ uptime 17:08:49 up 5:54, 6 users, load average: 2.03, 1.68, 1.50
uptime command gives a one line display of the following information.
  1. The current time (17:08:49)
  2. How long the system has been running (up 5:54)
  3. How many users are currently logged on (6 users)
  4. The system load averages for the past 1, 5, and 15 minutes (2.03, 1.68, 1.5)
This is the same information contained in the header line displayed by w and top command: $ w, $ top. Note that w displays who is logged on and what they are doing while top command provides a dynamic real-time view of a running Linux/UNIX/BSD system.