2

I'm new to MySQL. I'm doing the tutorial and trying to create a connection. I need to have a username and password. I get an error each time saying it

can't connect to username@localhost using password YES.

I'm just trying to set this up locally. What are the username and password supposed to be? How is the account created, where can I find it, etc? I am using Windows.

Thanks,

3 Answers 3

7

Good day Agezna

In MySql Workbench the username and password are the username and password of you MySql Server user. But once you don't know those as well.

Have you installed MySql Server alone from MySql website?

Or MySql Server was included in some web server applications bundle like:

  • Xampp. Default username is root and there is no password set.
  • Wampp. Default username is root and there is no password set.
  • other one? Try the same for Xampp if it doesn't work, specify the bundle name then i can help you.

If you installed MySql Server alone, the password was set at installation, if you need to change it, there is a executable in your MySql Server folder in your Start Menu in Windows where you can change the configuration of you server, including your default password.

Regards.

1
  • It's a long time later and MySQL Workbench really does not like us not having a password. I'm pretty sure the only way around it is to add a password or create another superuser with one.
    – mckenzm
    Sep 19, 2022 at 7:11
5

You are being prompted for a username and password for your MySQL server. If this is a fresh server installation, as others have said, the username root with a blank password should get you in initially. If this doesn't work you can always reset the root password if you have shell access. There are instructions here:

http://www.cyberciti.biz/tips/recover-mysql-root-password.html

1
  • Thank you. Someone else installed it on this machine and I didn't know what the password was. This helped me to reset it
    – agezna
    Oct 22, 2010 at 16:41
3

When you installed, did you set a root password? If so, use username "root" and the password you set. If not, leave "password" empty.

1
  • You're assuming he installed a MySQL server.
    – drudge
    Oct 20, 2010 at 23:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.