≡ Menu

root password

UNIX / Linux: Send E-mail When sudo Runs

I'm not told to use the root user to perform activities that do not require it. I've configured sudo for myself and for other web developers so that they can restart MySQL or Apache web server. How do I send email when sudo run by one of my user? How do I keep track of user login done via sudo command?
[click to continue…]

Lost MySQL Admin Password

I lost mysql admin (root user) password. How do I reset a lost MySQL admin (root) password under UNIX or Linux or BSD operating systems?
[click to continue…]

What is My root Password for MySQL Database Server?

Q. What is my root password for MySQL under CentOS Linux 5.0 server?
[click to continue…]

Linux sudo Configuration

Q. Can you tell me how to configure sudo to provide access to end users? How do I allow to run programs with the security privileges of another user using sudo?
[click to continue…]

Change MySQL root password

Q. How do I change MySQL server root password under Linux / UNIX operating system at shell prompt?

A. You need to mysqladmin command which is a client for performing administrative operations. You can use it to check the server’s configuration and current status, to create and drop databases, change mysql root password and more.

How do I change mysql root password?

If you are setting a root password first time, use any one of the following command syntax:
mysqladmin password "NEW-PASSWORD"
mysqladmin -u root password "NEW-PASSWORD"
mysqladmin -u root -h localhost password "NEW-PASSWORD"

To set password to d3s9cXq, enter:
# mysqladmin -u root password "d3s9cXq"

Please note that if the NEW-PASSWORD value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotes. Thus, the next time you invoke mysqladmin (or any other client program such as mysql) using the same account, you will need to specify the new password. So to login as root, enter the command:
# mysql -u root -p
# mysql -h localhost -u root -p


  • -u root: Specify username
  • -p : Prompt for password

If you would like to change current password d3s9cXq to OlzzYs$qz, enter the following command:
# mysqladmin -u root -p password "OlzzYs$qz"

Enter password: <enter old password>

Ubuntu Linux root Password (Default Password)

I have just installed Ubuntu Linux. But, what is the default root password? I can only login as a normal user. How do I login as root user?
[click to continue…]

MySQL Change root Password

How do I change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX-like like operating system over the ssh session?
[click to continue…]