Tag Archives: mysql

Reset MYSQL password

How to Reset a MySQL Password:

  1. Stop the mysqld daemon process,
  2. [root@host ~]# /etc/init.d/mysqld stop
    Stopping MySQL:               [  OK  ]
  3. Start the mysqld daemon process with the –skip-grant-tables option,
  4. [root@host ~]# /etc/init.d/mysqld start --skip-grant-tables
    Starting MySQL:                               [  OK  ]
  5. Start the mysql client with the -u root option,
  6. [root@host ~]# mysql -u root -p
    Enter password:

    <— enter current root password

  7. Change password to no password at all.  Execute the UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;
  8. mysql> UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
  9. Execute the FLUSH PRIVILEGES;  command.
  10. mysql> FLUSH PRIVILEGES;

Found somewhere on the internet and helps me a lot.

Linux dictionary

setxkbmap us <— change keyboard layout to us

update-alternatives --config editor <— change default editor

shutdown -rF now <— force file system check after reboot

dpkg --get-selections <— list installed application on Debian based Linux

growisofs -dvd-compat -Z /dev/hdb=xxx.iso <— burn dvd iso image

echo "/sbin/reboot" | at 1am <— restart server (computer) at 1am

mysqldump --add-drop-table -u xxxxx -p xxxxx database-name > database-name.sql <— backup mysql database

mysql -u xxxxx -p xxxxx database-name < database-name.sql <— restore mysql database

lshw <— is a small tool to extract detailed information on the hardware
configuration of the machine

ps aux | awk '{ print $8 " " $2 }' | grep -w Z <— find zombie process

cp -r /something/.[a-zA-Z0-9]* /somewhere/dir <--- copy hidden files somewhere

dmidecode <--- nice tool to find ... description of the system's hardware components... serial numbers and BIOS revision...