Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql set root password

use mysql;

update user set authentication_string=PASSWORD("mynewpassword") where User='root';

flush privileges;

quit
Comment

how to know password of mysql root in linux terminal

mysql> use mysql;
​mysql> update user set authentication_string=password('NEWPASSWORD') where user='root';
​mysql> flush privileges;
​mysql> quit
Comment

how to check current root password in mysql

If you don't remember your current root password and want to install new instance of MySQL and you have applied other ways like "-init-file.txt", but still failed.

There is another solution which worked for me. Uninstalling MySQL from control panel didn't remove all files, it left some references in the system.

To delete MySQL files completely, open the folder path C:Usersyour pc nameAppDataRoaming and delete the MySQL folder.

Then remove one more reference which is in C:ProgramDataMySQL, if not visible check your folder view options and uncheck "Don't show hidden files".

The last reference of MySQL exists in our system services:

Type "Services" in the search box of the taskbar. Find services related to MySQL and note them down. I have two in my case(MySQLRouter and MYSQL80).

Open the command prompt with administrator and type:

sc delete "ServiceName",

In my case:

sc delete MySQL80

sc delete MySQLRouter

Ensure all services related to MySQL are removed by using the above command. Restart your computer and install your MySQL instance with a new configuration.
Comment

find out password root database mysql

/cd /etc/mysql
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL Copy From Two Tables to One 
Sql :: one to one and one to many relationship 
Sql :: mysql pass command from command line 
Sql :: tablo silme SQL 
Sql :: creating tables in sql with python 
Sql :: insert json file to mssql 
Sql :: oracle undo usage per session 
Sql :: how to update linked server in sql server 
Sql :: postgres insert timestamp without timezone 
Sql :: automatically update database last seen datetime in sql 
Sql :: use of undefined constant mysql_assoc - assumed 
Sql :: how to install sql server management studio in ubuntu 18.04 
Sql :: sql select inside select sub query 
Sql :: view column type sql server 
Sql :: create a table from one field of another table 
Sql :: sql default 
Sql :: select indexname psql 
Sql :: oracle drop program 
Sql :: find duplicates in column sql 
Sql :: sql server synonym 
Sql :: how to use join with 3 tables in sql server 
Sql :: joint query 
Sql :: psql owner of database 
Sql :: update database collation in postgresql 
Sql :: sql less than operator 
Sql :: stored procedure 
Sql :: sql query interview questions githu 
Sql :: mysql create database 
Sql :: mariadb 
Sql :: SQL Server dynamic pivot unknown number of columns 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =