How to Reset MySQL Workbench Root Password - Mac - mysql

I need help, I forgot the root password, is there a way to reset/change it?
I uploaded some pictures.
1.
2.
3.
I got the same message (Number 2).

Open the keychain app and go to the passwords section. You will see an entry in the list that corresponds to the Service entry, which is shown in your screenshot. Double click it to open its properties, select the checkbox "show password" (or whatever it is titled in your language), enter your Mac password and voilá - there is your MySQL password.

Related

not able to change MS Access password

I have an MS Access database. I do not know why I am not able to change the password. I open the database in exclusive and then enter the password to open the database. When I click the file, the info only has Compact & Repair and Encrypt with Password. When I click the Encrypt with Password and enter the password, it already says 'Invalid password'. I am also not able to remove the password since there is no item for it. When I open a blank database and try to remove the password, it is ok since there is an icon and text to show to remove the password. Could anyone help me to correct this? why like this.

Setting up MAMP - changing password

New to php, mysql and apache, but not to html/css and web design. Have downloaded MAMP to create new joomla website offline (also fairly new to joomla).
Following instructions in MAMP documentation and dwuser.com/education/content/why-you-need-a-testing-server-and-how-to-do-it/ and other sources (though am wary of non-official sites and years old info). It seems all is installed correctly (the message says so).
Trying to change the password of the mysql root user via Terminal app (inexperienced in console work too, sorry). After entering the correct text and substituting new password I am prompted for a password. There's a grey upright box with a white circle at the spot where I'd enter this old password ('root'). If I switch away from the terminal window the box becomes an outlined version.
Have tried limiting the new pw to all lowercase (12 characters), putting in computer admin password, and also searching to find out what the box means (unsuccessfully).
Also tried continuing setup by changing the password in the config.inc.php file (just in case) but afterwards password error messages came up.
Searching on the password error part has shown others have had problems but the replies have been beyond me, hopefully my knowledge will advance in time.
I hope some kind person will point me in the right direction... please? (In fairly simple terms too please).
Many thanks in advance.
.....
more info via edit
In the console I am keying
/Applications/MAMP/Library/bin/mysqladmin -u root -p password [NewPassword]
and substituting a new password (random 12 character) for [NewPassword]. After 'enter', the following line shows
Enter password: "grey sq box here"
and at this point nothing can be entered in the console.
So I know something's already amiss.
Thanks for your help...
I'll try to explain as detail as possible.
I believe you can execute the terminal.
0.Move to mampstack folder
$cd /Applications/MAMP/
stop mysql service
$sudo ./ctlscript.sh stop mysql
Password:"your_macbook_user_password"
2.Command not to look at grant table(which requires password input)
$/Applications/MAMP/Library/bin/mysqld_safe --skip-grant-tables &
3.You can enter mysql root directly due to 2nd process
mysql -u root mysql
change the password with the update query
mysql>update user set password=password('new-passwd') where user = 'root';
quit the mysql
mysql>flush privileges;
mysql>quit
restart the mysql
service mysqld restart service mysql restart Try both

WampServer: How to create a new MySql root password?

I deleted all users from my MySql and got left out. How can I start from scratch? I tried removing the server and reinstalling but apperantly some file remained.
Have you tried the instructions provided here:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
Your answer will be just log on to localhost/phpmyadmin
if it asked login detail just type root as user name and just enter and you will see :
above users tab click on that and you will see users overview :
Click on Edit Privileges in last row of table , then you will see global privileges
check all , and go below you will see Change password and there select change password
and type your password and click on go and you are done :

Authenticate as a specific user in MySQL

I'm a Brand new User to MySQL DB, have installed the WAMPSERVER and I'm using MySQL through the MySQL console.
Query_1: Every time that I log in, it directly asks me for the password of root. However, i want to log in as a different user.
Query_2: If at all i do login as root, i want to switch user without closing the console.
How can I do this?
Thank you.
You can specify your username and password like this:
shell> mysql --user=user_name --password=your_password db_name
As far as I know, there is no way to change user after login without restarting the client.
I don't think its possible to switch users while in the console itself. You have to login with the different user instead.
Logging in use this command
mysql -u username -p
Then it will prompt for the password.
It is not possible to switch users in the MySQL console using WAMP. You must use SQL through the windows command line to switch users.
Steps (win 8):
1) Start
2) Type: 'command prompt'
3) Type: 'cd /'
4) Navigate to where WAMP bin is located, my location is: C:\wamp\bin\mysql\mysql5.6.17\bin by typing: 'CD wamp\bin\mysql\mysql5.6.17\bin'
5) run SQL under new user by typing 'mysql -u (username you want to use) -p (database you want to connect to)'
You will now be logged in as a new user.
If you attempt to login without specifying a user-name, MySQL will assume "root". In most cases you don't switch the user, but give a single user all the required rights;, for example to access multiple databases. If that is not possible for you, you can use two MySQL connections with two different users simultaneously.
The MySQL console provided in the wampserver admin panel, once a password is set, will prompt you for the root user's password before you can do anything. In order to log-in as a different user you need to log-in from the command-line. In order to this however, you'll need to add the file pathway to your installation of MySQL's bin folder to your user environment pathway so that your system will be able to access MySQL from the command line. To do this on windows open up file explorer, click on your C drive, open the wamp folder, open bin folder, open MySQL folder, open the MySQL folder with your installation version, open the bin folder you find there. In the file pathway bar of file explorer click on the folder icon to the left to generate the pathway to this bin folder, copy the pathway. Next open up control panel, in the search bar type the string environment variables, select edit user environment... you don't want to mess with the system environment, on the screen that appears choose the PATH variable- if it's not there then add it. Finally paste in the file pathway to MySQL's bin folder. Open up a command prompt and type mysql -u uswername -p hit return and then you'll be prompted for that user's password. Assuming of course you've made another user already.
As far as I know, once logged in as the root or any other user, the only way to switch is to exit mysql and then enter again as a different user.

How to find out the username and password for mysql database

I've forgotten what I set as username and password for mysql database. How could I be able to find it out? I am using wamp server. I am a newbie in mysql.
Go to this file in: WampFolder\apps\phpmyadmin[phpmyadmin version]\config.inc.php
Usually wamp is in your main hard drive folder C:\wamp\
You will see something like:
$cfg['Servers'][$i]['user'] = 'YOUR USER NAME IS HERE';
$cfg['Servers'][$i]['password'] = 'AND YOU PASSWORD IS HERE';
Try using the password and username that you have on that file.
Assuming that the user you are using in phpmyadmin has the necessary privileges, you can run this query to change the root password:
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
If you forget your password for SQL plus 10g then follow the steps :
START
Type RUN in the search box
Type 'cnc' in the box captioned as OPEN and a black box will appear
4.There will be some text already in the box. (C:\Users\admin>) Just beside that start typing 'sqlplus/nolog' press ENTER key
On the next line type 'conn sys/change_on_install as sysdba' (press ENTER)
6.(in the next line after sql-> type) 'alter user scott account unlock' .
Now open your slpplus and type user name as 'scott' and password as 'tiger'.
If it asks your old password then type the one you have given while installing.
In your local system right,
go to this url : http://localhost/phpmyadmin/
In this click mysql default db, after that browser user table to get existing username and password.
One of valid JDBC url is
jdbcUrl=jdbc:mysql://localhost:3306/wsmg?user=root&password=root
There are two easy ways:
In your cpanel
Go to cpanel/ softaculous/ wordpress, under the current installation, you will see the websites you have installed with the wordpress.
Click the "edit detail" of the particular website and you will see your SQL database username and password.
In your server
Access your FTP and view the wp-config.php
Open phpmyadmin, go to database and corresponding table to find it out.