6

17 comments

[–] curious [OP] 0 points (+0|-0)

Thanks @E-werd. It's on my local machine. So it's more of a test site.

You'll want to go into the MySQL console and create a database and a new user that throat will use to access it. You need to know the root login for MySQL/MariaDB, once you do you can use these commands to create the database and user. Change 'Pass1234' with whatever password you'd like, I'd suggest something randomly generated. DO NOT LOSE THIS.

Since it's on my local machine/test site, should I leave the contents of the file as is instead of going through with the steps you have mentioned below?

mysql -u root -p
CREATE DATABASE throat;
CREATE USER 'throat'@localhost IDENTIFIED BY 'Pass1234';
GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
exit

[–] E-werd 2 points (+2|-0) Edited

should I leave the contents of the file as is instead of going through with the steps you have mentioned below?

Both. You shouldn't be changing the contents of that file anyway.

[–] curious [OP] 0 points (+0|-0) Edited

Thank you so much @E-werd.

So, to conclude.

  1. I won't touch the said file (debian.cnf)

  2. Run the script below as you have mentioned.

mysql -u root -p
CREATE DATABASE throat;
CREATE USER 'throat'@localhost IDENTIFIED BY 'Pass1234';
GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
exit

One last question: Is the mysql password the same as the root password? It's asking me for a password when I run mysql -u root -p. Sorry if you found the question stupid. I'm really dumb in this.

[–] E-werd 2 points (+2|-0)

There's linux root (as defined in /etc/passwd, the super user account on the system) and there's the mysql/mariadb root. They're two different things, the latter being specifically for mysql/mariadb.