Difference between revisions of "MYSQL-notes"

From Wiki at Neela Nurseries
Jump to: navigation, search
m (References)
m (References)
Line 48: Line 48:
 
== References ==
 
== References ==
  
 +
<br />
 
*  https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/<br />
 
*  https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/<br />
 
<!--
 
<!--
Line 54: Line 55:
 
*  https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password<br />
 
*  https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password<br />
  
 +
- 2017-07-27 Thursday -
 +
*  https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04
 +
*  https://dev.mysql.com/doc/refman/5.7/en/show-variables.html<br />
  
*  https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04
 
  
  
 
<!-- comment -->
 
<!-- comment -->
 +
  
  
 
<!-- EOF -->
 
<!-- EOF -->

Revision as of 00:57, 28 July 2017



MYSQL Reset Root Password

mysql> select Host, User, authentication_string from user;
+---------------+------------------+-------------------------------------------+
| Host          | User             | authentication_string                     |
+---------------+------------------+-------------------------------------------+
| localhost     | root             | *7DED8F04F1F0C0639D9631FEFFDA4539EE31DD17 |
| alta-spare-2u | root             | *7DED8F04F1F0C0639D9631FEFFDA4539EE31DD17 |
| 127.0.0.1     | root             | *7DED8F04F1F0C0639D9631FEFFDA4539EE31DD17 |
| ::1           | root             | *7DED8F04F1F0C0639D9631FEFFDA4539EE31DD17 |
| localhost     | debian-sys-maint | *E8C7D3BB3A512229A60E85B7A2A23484ED003A94 |
| localhost     | mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| localhost     | wikiuser         | *F05B4F375EA1AC92DB6916D2F25E41B5689539FD |
+---------------+------------------+-------------------------------------------+
7 rows in set (0.02 sec)

mysql> update user set authentication_string=PASSWORD("new-root-password-to-mysql") where User='root';
Query OK, 4 rows affected, 1 warning (0.02 sec)
Rows matched: 4  Changed: 4  Warnings: 1

mysql> select Host, User, authentication_string from user;
+---------------+------------------+-------------------------------------------+
| Host          | User             | authentication_string                     |
+---------------+------------------+-------------------------------------------+
| localhost     | root             | *A070565E56DA8DBCF462EEE4A67C59881CC60597 |
| alta-spare-2u | root             | *A070565E56DA8DBCF462EEE4A67C59881CC60597 |
| 127.0.0.1     | root             | *A070565E56DA8DBCF462EEE4A67C59881CC60597 |
| ::1           | root             | *A070565E56DA8DBCF462EEE4A67C59881CC60597 |
| localhost     | debian-sys-maint | *E8C7D3BB3A512229A60E85B7A2A23484ED003A94 |
| localhost     | mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| localhost     | wikiuser         | *F05B4F375EA1AC92DB6916D2F25E41B5689539FD |
+---------------+------------------+-------------------------------------------+
7 rows in set (0.00 sec)

mysql>



References


- 2017-07-27 Thursday -