Reset MySQL root Password

Reset MySQL 5.7 root password on Ubuntu 16.04 To reset MySQL root password, stop MySQL

Start MySQL with

Start another terminal, login to MySQL as root

Run following commands to change password.

Now you need to kill running MySQL processes and start MySQL as normal.

[…]

Read More…

MySQL User

To allow a user to create another user

Now this user will be able to create new users. Create a user with root privilages

For MySQL 8

[…]

Read More…

Debian Allow MySQL root user to login using phpMyAdmin

On Debian/Ubuntu by default MySQL root user can only login from local accounts.

To enable login from phpMyAdmin, you need to set plugin to “mysql_native_password”. To do this, login to MySQL as user root, then run

[…]

Read More…

Configuring MySQL .my.cnf

Add following content

Replace DBPASSWORD with your MySQL root password. Now set permission for this file to 600, so no user other than root can see it.

[…]

Read More…