What is the initial password of MySQL server? - mysql

I downloaded MySQL server 5.7 on my computer (first time) to prove it. But the installer asking me for a password for root#localHost that I have no idea where it is.
I saw a page that you can reset the password using the command line, but the command line ask me too for a password.
What I can do?
UPDATE:
You have told me that if I have not set a password , then the server does not require you to enter one, but observe ! I want to configure the program but will not let me continue !
UPDATE (SOLVED): had to reinstall the MySQL server and the problem disappeared ... (Still asking why happened that...)
Thank you all for your responses and comments!

I think that by default there is no password set for root account.
Source

https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html
If you have never assigned a root password for MySQL, the server does not require a password at all for connecting as root. 

Your default account for the connection to the service of phpmyadmin is user: root and no password. That exist for the Security of the databases

Related

Mysql community server :enter the root account password - on windows

I am installing Mysql community server and during this step it asks me to enter the password for the root account and i don't know how to solve this problem. Any help please ?
This is asking you to set the root password. Its a new password. Set the password to something that is memorable (or written on a post-it note).

Why is there prompt asking for a MySQL server password when I did not even set one?

I just installed MySQL just now so I shouldn't have been able to place a password beforehand.
This appears when I try to test the connection:
Then if I leave it blank, it errors.
I also tried 'root' as password and 'admin' just to try a few and it still errors. I try to type mysql -u root -p in MySQL shell but it keeps saying i'm not connected. I'm lost.
It doesn't know until after it connects whether there is a password or not. That's because it needs the password to connect. So it always asks for one.
I think the problem you have is that there is a subtle difference between no password and a blank password and because you're not entering one, the connection is being made with no password when perhaps you've set a blank one.
Perhaps try to find the MySQL CLI client for Windows and look at the --password option.

Can't connect to MySQL using SequelPro

I have recently installed MySQL 5.7.16 on an iMac running El Capitan. I had a few minor hiccups initially because I forgot the root password but that has now been reset and I can now log into MySQL as root user using:
$ mysql -u root -p
However, when I try to connect to MySQL server as root using SequelPro, I get the message:
Unable to connect via the socket, or the request timed out.
Double-check that the socket path is correct and that you have the necessary privileges, and that the server is running.
MySQL said: Your password has expired. To log in you must change it using a client that supports expired passwords.
When I look in /tmp folder, I was expecting to find mysql.sock but, instead, there is a file called mysql.sock.lock. Could this be causing the problem? I can't find where that .lock file has come from and I'm not sure what to do about it. Any help would be appreciated.
I'm not entirely sure what happened to cause the root password to expire but something had thrown a spanner in the works. Anyway, the solution for me was to log into MySQL from the Terminal using:
$ mysql -u root -p
...and then alter the root user's password using:
> ALTER USER 'root'#'localhost' IDENTIFIED BY 'NewPass';
That seemed to do the trick. I was then able to log in to MySQL using Sequel Pro with no problems.
Instead of using a socket connection, you could try connecting via Sequel Pro's standard connection using 127.0.0.1 as the host.
Thus spake the 5.7 docs:
The installation process creates only a single root account, 'root'#'localhost', automatically generates a random password for this account, and marks the password expired. The MySQL administrator must connect as root using the random password and assign a new password. (The server writes the random password to the error log.)
So, connect from terminal and change the root password.
Either your first password may not have been saved OR it just truly never persisted.
For me it was the sudo /usr/local/bin/mysql_secure_installation that may not have ever persisted the password correctly. Since your first password never changed, there is no password or ,like your error said, "expired" to nothing.
Run or rerun the code above, don't type anything for the password field and follow the steps, from the preloaded setup program.

Changing SSH Password which is routing through mysql

I have mysql root username and password with me and i am on centos server. I know how to login through putty to the mysql panel.
I am in. we are also connecting the mysql through Navicat and it accepts the SSH connection to the mysql server even we do provide the username / password because the server is not directly linked.
So, what is the possibility that i can change the Password of the SSH which is doing the mysql connectivity through navicat.
how can i use the command console panel to change the SSH to change it
Please do not vote for negative as if the question is not clear, ask me before downvoting
Regards
So, Here is the Solution.
When i was logging into putty, i was doing the ssh using my username and password, the same credentials i used in navicat and bang it worked, so there was no need to change the credentials, i already got it connected to my database, sory about the confusion, hopefully one should never encounter this issue, for me it was hard to debug as i was very new to centos operating system

How do I get phpMyAdmin to connect to a local mysql server?

I have my config.inc.php file, and have set my host name to localhost. Unfortunately, I have no idea what my username/password should be. Is that something I need to configure on the MySql side? I tried creating an arbitrary username/password (admin/password), but when I try to log into phpMyAdmin with those credentials, I get an error: (#1045 - Access denied for user 'admin'#'localhost' (using password: YES))
Can anyone point me in the right direction? (Sorry for the dumb question; I just haven't had to install mysql before. I've always had a host name / username / password given to me.)
Thanks!
root with no password.
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
here you have the default privileges in mysql, and how to change them.
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
What installation of mysql are you using? Without knowing that its very hard to know. I would recommend getting the wamp installation and remembering that the usual "normal" installation uses user name: root and no password
I had this problem before, you need to go and look up the password in the config files yourself, since phpMyAdmin's interface will hide the password from you. It's a pain... unfortunately I'm too lazy to install it myself and find exactly where it is for you.