0

I have downloaded MySQL from here: https://dev.mysql.com/downloads/mysql/

I clicked on the file and installed it.

Now I have it in my Mac System Preferences > MySQL

I do not remember the username that I used (probably the default they gave me).

How can I know the username of MySQL?

(MacOS Catalina. 10.15.3. I use the Terminal)

Nrc
  • 9,577
  • 17
  • 67
  • 114
  • Did you try root? – nbk Mar 22 '20 at 12:16
  • I tried. It gives me a long error. At the end: sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client', sqlState: '08004', fatal: true – Nrc Mar 22 '20 at 12:28
  • that has nothing to do with the username, that is a problem that mysql doesn't by default allow this see how you can change it to native password https://stackoverflow.com/a/49228443/5193536 – nbk Mar 22 '20 at 12:40
  • I am a beginner. I just do not understand that answer – Nrc Mar 22 '20 at 15:07
  • mysql 8 has increased security and doesn't allow plain passwords. so your user has to support native_password like described in the link provided, so alter the user like described and it works. – nbk Mar 22 '20 at 15:14
  • I am just beginning a tutorial: https://www.w3schools.com/nodejs/nodejs_mysql.asp I just do not know where I have to put that code you mention – Nrc Mar 22 '20 at 15:30
  • simpy connect to your server mysql -u root -p password and and enter then the commands – nbk Mar 22 '20 at 15:42

1 Answers1

1

The default username in mySql is root Connect to the sql server using: mysql -u root

No_Name
  • 155
  • 2
  • 14
  • As I said to nbk: I tried. It gives me a long error. At the end: sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client', sqlState: '08004', fatal: true – Nrc Mar 22 '20 at 15:39