my sql user and paswword

Hi ,
I downloaded mysql-5.6.27-winx64.zip and unzipped to a folder.
but not able to connect to it .
at command prompt tried mysql -u root - p admin
It says invalid crednitails.
pls advise some guidlines to start with mysql, like creating a new user and password and connecting to it and create tables
santomAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim RiddlesPrepress/OMS SpecialistCommented:
The command you entered is trying to connect to a machine named "admin". Is that your machine's name and will it resolve to that? Try entering the following command:

mysql -u root -p localhost

Enter your password at the prompt and see if that works.
Dan CraciunIT ConsultantCommented:
If you just installed it, it has no password, so simply use this:
mysql -u root

Here's the man page for creating a password for the root user: https://dev.mysql.com/doc/refman/5.6/en/default-privileges.html

HTH,
Dan
ldvhaiCommented:
You need to set up initially for MySQL (run only one time after installing MySQL) using the following command:
sudo /usr/bin/mysql_secure_installation
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

santomAuthor Commented:
I am using mysql in windows.

I tried this : mysql -u root -p localhost it as
        It asks for password i just unzipped i did not set any password. what password i have to use.?

I also tried : mysql -u root  -- this gives can not connect to mysql server.

Pls advise in detail to connect to MYsqll server.
Jim RiddlesPrepress/OMS SpecialistCommented:
How about trying this (logging in without a password):

mysql -u root localhost

Open in new window


If that doesn't work, then I am not sure what to do.  If you installed MySQL using the installer from Oracle's site, it should have prompted you during install to set a password for the root account.

Check out these instructions: MySQL 5.7 Post Installation Instructions
ldvhaiCommented:
You forgot setting password for your MySQL root account when the installer finishes.

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD

Open in new window


Reference: http://corlewsolutions.com/articles/article-21-how-to-install-mysql-server-5-6-on-windows-7-development-machine

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
santomAuthor Commented:
By following above link steps abel to setup tx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.