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
Related
I'm running an Ubuntu Server with MySQL in VirtualBox and trying to change the password for a user.
I run:
sudo mysql -u root -p
to access MySQL. At this point, and with any other commands not trying to see a user's password, everything is working.
In MySQL ( ) I run:
SELECT * FROM mysql.user;
After I run this, the entire display and terminal change. The output and command line are both displaying strange characters. I run this command which works just fine. What gives?
SELECT user FROM mysql.user;
Here are the before and after screen shots:
Screen Shot Before,
Screen Shot After
Any help would be greatly appreciated. I have no clue why this is happening. Is this an Ubuntu thing, a MySQL thing or a VirtualBox thing? I'm a noob so this is just an uninformed theory but could it have something to do with MySQL authenticated_string and something to do with hashing?
It actually creates a change that persists even upon typing exit and hitting Enter, exiting MySQL and back to the Ubuntu command line where the weird characters are still showing.
EDIT:
I was following a blog tutorial and inserted <db-password> as the password when creating the MySQL user. I was supposed to insert an actual new password instead but figured I'd just use that. Are the <, - or > characters that I used when setting the user's MySQL password maybe causing this?
I believe this was a character encoding issue in MySQL because SELECT * FROM mysql.user WHERE user = 'root'; doesn't have the same issue. Because of that, I believe the issue only occurs at that one user's password data point where the <, - and > characters were used. Maybe someone else can provide a better answer explaining more thoroughly why this occurs. Specifically, I'm curious as to how this issue in MySQL is then able to affect the appearance of the Ubuntu Command Line once the MySQL shell is exited.
I've just installed EasyPHP and in the MySQL section I created a new user called "foo" and checked the box to give it all privileges. When I click on the tab to manage the MySQL user accounts the user "foo" is there. But it shows foo's level of privileges only as "USAGE", and when I mouseover that word it says, "no privileges".
So I tried to update the privileges for foo. But when I try to edit them I get the error
"#1524 - Plugin '*E394918EB0645561038DD951D0CABA8042DDFE14' is not
loaded".
Interestingly, when I go back to the tab for user accounts and mouseover the "root" user it states
"Includes all privileges except GRANT"
Maybe this is why it can't grant "foo" any privileges?
Any idea how to give "foo" all privileges? I'd like to use that as my development account.
PS At the bottom of that page there is a message that says: "
Note: phpMyAdmin gets the users' privileges directly from MySQL's
privilege tables. The content of these tables may differ from the
privileges the server uses, if they have been changed manually."
Could this be a possible solution, and if so, could someone share a link that shows how to change the MySQL privilege table manually?
OK, after hours of searching around I'm getting much closer to a solution.
It turns out that there is an error in the EasyPHP installation package that is related to changes from earlier versions of MySQL. Here is the workaround:
(1) Open the file:
:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\dbserver\mysql5711x86x160717165359\my.ini
(2) Add this line at the end and then save the file:
show_compatibility_56 = on
(3) Restart the MySQL server from the EasyPHP dashboard.
Oh yes, I also ran the following upgrade from the MySQL command line:
mysql_upgrade -u root -p
This has cleared up some errors which showed up in other tabs that I didn't mention, such as not having permission to access the server status and not being able to get a list of the MySQL variables.
I still would like to solve the original problem but have spent too much time on this initial stage to work on it tonight. If anyone has info that please post.
I had the same issue. What I did to fix it was quite simple.
Exit EasyPhp.
Navigate to directory **\EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86xxx\data**
Find and remove the following files with ext .frm & .ibd
innodb_index_stats
innodb_table_stats
slave_master_info
slave_relay_log_info
slave_worker_info
After navigate to directory \EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86xxx\bin
Open command prompt and type
mysql_update -u root -p
<BLANK>
Afterwords you should see MySQL update, aswell as some of easyphp's files.
Exit mysql terminal, and start EasyPhp again.
Hope that helps!
Currently trying to install and start a MySQL Server on my machine. I'm using the original, actual Installer/Wizard. After filling out all fields, setting a root passwords and also telling to create one user with the password on localhost, the application fails at the step "Creating user accounts".
The log says:
Attempting to Add New MySQL Users Authentication to host 'localhost'
for user 'root' using method 'mysql_native_password' failed with
message: Access denied for user 'root'#'localhost' (using password:
YES) Ended configuration step: Creating user accounts.
Interesting to note, I've done this on a testing device as well as on a fresh virtual machine. I've used different data and names actually, but with the same result >_< What could I be doing principally wrong?
Thanks in advance!
EDIT: Sort of solved... I re-downloaded the database alone and manually created users. Guess that's the better way when being about to learn SQL properly anyways.
That error blocks your installation - although your MySQL server is running - it keeps you from installing the samples and examples. However, if you ignore installing these samples and examples, you can start MySQL Workbench. Moreover, the root account will be available with the password you have set during the install procedure (using Windows). Just launch the Workbench.
I went back to the Accounts and Roles tab> "edit" on my user and my account said I needed a user name> reentered User name> save> next> rename MySQL> Execute== ran fine and finished install.
This was the easy way with all other updates for co-programs done already.
For anyone still having trouble, a simple solution for me was making sure my user names and passwords did not contain special characters such as \ > ~, and so on. Characters such as # and ! should work fine.
I installed EasyPHP 5.3.6, opened PhpMyAdmin, created a new databased and set password for root user. "Naturally" following that I was unable to login into PhpMyAdmin anymore, getting the infamous 1045 Access Denied error.
I tried everything I could find - setting password (in two places) in config.inc.php doesn't seem to work. I also tried changing AllowNoPassword to true (or false, whichever one it was not originally), that didn't do anything. I tried going through phpmyadmin/scripts/signon.php and enter the password there (it's the correct password, I saved it in my password manager) and couldn't login either. I also tried following instructions for resetting MySQL password I found but they used a mysqld-nt.exe which I didn't find in my installation. I also tried uninstalling EasyPHP and reinstalling it (and before doing that I used ccleaner to remove any registry issues it found, though admittedly there was nothing there about mysql) and it of course retained the "incorrect password" and wouldn't let me login.
Short of reformatting my harddrive I'm not sure what else I can do. (How does it keep the broken settings after uninstall??)
Any help would be appreciated.
I also would like to understand why doing something supposedly good to protect your database turns out to be such a painful procedure that it is actually recommended to leave the root user without a password? sigh
Go to EasyPHP-12.1\modules\ folder. Open folder for PhPMyAdmin version you are using (in my case it was phpmyadmin356x130206112511). Find file config.inc.php. Right click edit with Notepad.
Under line:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
paste this line:
$cfg['Servers'][$i]['password'] = 'YOURPASSWORD';
where YOURPASSWORD is your desired password.
Save file and refresh the "Local Web" page.
Clearing cache allowed me to get to phpmyadmin after re-installing easyphp. Thanks to Danae above.
I just killed mysql and restarted, it worked fine for me.
Happened to me also. Unfortunately my internet decided to go down at the same time and I was unable to google this page. The "help" that comes up when you are denied access is really lame ( but hat's off to easyphp creator. ) The "help" tells you " check your configuration files"
EDIT: I had MySQL installed twice on my machine (XAMPP & on its own)
When I enter my password into MySQL Command Line Client, it rejects my password, gives 1 beep and closes the window. Can anyone provide me with a basic troubleshooting list of steps (from simple to progressively more technical) to regain entry into MySQL once and for all. Also, can anyone tell me what can cause my password to suddenly be rejected? I am also running XAMPP and the MySQL service is both installed and running. Thanks in advance.
I remember when I first got this problem some months ago, if I recall correctly, I solved it by starting the MySQL service from Windows XP's Administrative Tool (something I did stopped the MySQL service and to this day I don't know what it was).
Now the problem has started back again but this time, when I checked Services, the MySQL service was already 'started'.
Any assistance will be appreciated. Thanks
I think I figured out why my password was not working. I had two versions of MySQL installed on my machine (XAMPP and MySQL 5.1). So I deleted the MySQL 5.1 and it worked.
For me (and my similar problem),
--password = mypass
didn't work, but
--password="mypass"
did.
Is there an error message when it rejects your password? I wonder if perhaps you are using an outdated client and running into this issue: http://dev.mysql.com/doc/refman/5.1/en/old-client.html
If you set mySQL to not begin running on startup, then you need to start it prior to attempting to login. This can be done via the command line, via the task manager if you configured it as a windows service, etc.
For example, here is an explanation of starting the service using cmd
Starting MySQL from the Windows Command Line | MySQL
Do you have the password for the root account? If so, try this from the command line?
mysql --user=root --password=your password here
or
mysql --user=root --password=your password here --database=MySQL
A bit too late but - If you have numeric characters in your password and are using the numpad on your keyboard, ensure that the numlock is ON. For some weird reason if you have numlock off MySQL will still interpret a keystroke. This wasn't very obvious to me since my laptop doesn't have a num lock indicator light, thats HP for yah :)
How to Reset the Root Password | MySQL
This is the services solution that was mentioned. Use this if you can't remember your root password.
I'd like to add another successful solution to this problem. I reran the installer (the msi), chose the repair option and everything was fixed.
My password suddenly worked again, so I took the following steps to change it:
Using Windows Command Prompt, navigate to MySQL's bin directory
Type: mysqladmin -uroot -p password yourNewPassword
Press Enter. You will be prompted for your password, enter it
If no error messages/beeps happen, your password was successfully changed
Log in using MySQL Command Prompt with your new password
What I don't understand is that WHY all of a sudden my password started back to work after approximately 24 hours? I wish I know so I can avoid this in the future.