MySQL trouble creating a new user

I had some problems with getting mysql and creating a new user. I expected to be prompted to enter credentials on installing mysql-server on the cli.

First started mysql:
sudo service mysql start

Then wanted to get into the mysql shell
sudo mysql -u $username -p

For the first time $username = root and password is system root password.

There was not password column in mysql.user table shown by:
desc mysql.user

So to check the present users I could not use:
SELECT user, host, password FROM mysql.user

To view the present users I had to use:
SELECT user, host FROM mysql.user 

From this piont on I could follow the below link to create a new user.
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

P.S.
Appartently from mysql 5.7 onward the password field is replaced by authentication_field using the md5 encryption this encryption gives a false sense of security since it already has been cracked and can be decrypted with things like: hashkiller.co.uk/md5-decrypter.aspx 

Help Resource:
https://stackoverflow.com/questions/30692812/mysql-user-db-does-not-have-password-columns-installing-mysql-on-osx

https://www.databasejournal.com/features/mysql/how-mysql-protects-your-password.html

https://stackoverflow.com/questions/5654819/how-can-i-decrypt-mysql-passwords





Comments

Popular posts from this blog

Thinking about tech: Technological Determinism

Deep fakes, fake news, it's old news!

Software development as a growing profession - Present