MySQL commands: Difference between revisions

Jump to navigation Jump to search
58 bytes added ,  4 January 2017
m
(→‎Troubleshooting of MySQL: ERROR 1827 (HY000): The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.)
Line 169: Line 169:
</pre>
</pre>


(2a) If the account was created
(2a) If the account was created, set the password for the account.
<pre>
<pre>
SET PASSWORD FOR 'test'@'localhost' = PASSWORD('my_password');
SET PASSWORD FOR 'test'@'localhost' = PASSWORD('my_password');
</pre>
</pre>


(2b) If the account was NOT created
(2b) If the account was NOT created, re-create the account.
<pre>
<pre>
CREATE USER 'test'@'localhost' IDENTIFIED BY 'my_password';
CREATE USER 'test'@'localhost' IDENTIFIED BY 'my_password';
Line 183: Line 183:
* [http://dev.mysql.com/doc/refman/5.7/en/set-password.html MySQL :: MySQL 5.7 Reference Manual :: 14.7.1.7 SET PASSWORD Syntax]
* [http://dev.mysql.com/doc/refman/5.7/en/set-password.html MySQL :: MySQL 5.7 Reference Manual :: 14.7.1.7 SET PASSWORD Syntax]
* [http://dev.mysql.com/doc/refman/5.7/en/drop-user.html MySQL :: MySQL 5.7 Reference Manual :: 14.7.1.3 DROP USER Syntax]
* [http://dev.mysql.com/doc/refman/5.7/en/drop-user.html MySQL :: MySQL 5.7 Reference Manual :: 14.7.1.3 DROP USER Syntax]


==== ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql.sock' ====
==== ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql.sock' ====

Navigation menu