CentOS 7

How To Change Mysql Root Password

Share on LinkedIn

To change or update the root mysql user password from thispw, you can set the new password to thatpw by running this command:

mysqladmin -u root -p'thispw' password 'thatpw'

That’s it.

CentOS 7

How To Change Time/Date In Linux From Command Prompt

Share on LinkedIn

These commands work with CentOS 6.5. The commands for CentOS 7 are similar and you should be able to figure them out if you start with these commands.

Only change time not date:

To only set the time use like this:

# date -s hh:mm:ss

Update Hardware clock:

To sync the hardware clock to the current system clock:

# hwclock –systohc
# hwclock –systohc –utc
***** use the second option if you use UTC.

Set Hardware clock manually:

To know the current time of the hardware clock:

# hwclock –show
Tue Nov  4 22:13:40 2003  -0.684660 seconds

To set the hw clock manually:

# hwclock –set –date=”09/21/2005 14:23:23″


We run into power issues from time to time and our servers have been known to lose their time. The hardware time may not have been changed and the system often synchronizes off of the hardware clock, especially following a power cycle.

Below are the steps I performed to 1. change the system clock to the correct time and then 2. synchronize the hardware clock up to the system clock.

[root@ ~]# date -s 16:30:00
Mon Jan 26 16:30:00 CST 2015
[root@ ~]# date
Mon Jan 26 16:30:05 CST 2015
[root@ ~]# hwclock –show
Mon 26 Jan 2015 03:09:58 PM CST -0.188457 seconds
[root@ ~]# hwclock –systohc –utc
[root@ ~]# hwclock –show
Mon 26 Jan 2015 04:35:40 PM CST -0.616988 seconds

How To Change Hostname On CentOS 6.5

There are 3 steps to this process.

First, change the hostname

hostname <whatyouwantittobe>

Second, change the hostname on the adapter

nano /etc/sysconfig/network

Ctrl+X -> Y -> Enter

And last, restart network service

service network restart

How To Change MTU Size In Windows 7

By default, the MTU (Maximum Transmission Unit) size is 1500. I’ve run into issues pulling up resources in remote regions, such as South Africa, where MTU restrictions are implemented by local ISP’s. To work around these obstacles, changing the MTU size is necessary.

To begin, ensure you’re an admin user on the computer. These instructions are assuming you are using your Local Area Connection for your connection which is most likely a Cat5 cable.

1. Open a command line window as an Administrator (ie. right click on All Programs > Accessories > Command Prompt and select Run as administrator)
2. Type the command netsh and wait for prompt
3. Type the command interface and wait for prompt
4. Type the command ipv4 and wait for prompt
5. Type the command set subinterface “Wireless Network Connection” mtu=1300

Leave the command prompt up so you can change it back to 1500 when you are done. There are troubleshooting steps to take to see if you are having an MTU size issue that I will cover in another post. Come back and search regularly.