I am working in Symfony application on my Mac and I continue getting this message: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) I have tried it without password, with password, I have tried it in this mysql -u root, in this manner mysql -u root -p.
Had the same problem. Seems like there is something wrong with the set up instructions or the initial tables that are being created.
This is how I got mysqld running on my machine. If the mysqld server is already running on your Mac, stop it first with: launchctl unload -w /Library/LaunchAgents/com.mysql.mysqld.plist Start the mysqld server with the following command which lets anyone log in with full permissions. Mysqldsafe -skip-grant-tables Then run mysql -u root which should now let you log in successfully without a password. The following command should reset all the root passwords. UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root'; FLUSH PRIVILEGES; Now if you kill the running copy of mysqldsafe and start it up again without the skip-grant-tables option, you should be able to log in with mysql -u root -p and the new password you just set. Brew install mysql version I'm trying to setup up MySQL on mac os 10.6 using Homebrew by brew install mysql 5.1.52. Everything goes well and I am also successful with the mysqlinstalldb.
However when I try to connect to the server using: /usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass' I get: /usr/local/Cellar/mysql/5.1.52/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' I've tried to access mysqladmin or mysql using -u root -proot as well, but it doesn't work with or without password. This is a brand new installation on a brand new machine and as far as I know the new installation must be accessible without a root password. I also tried: /usr/local/Cellar/mysql/5.1.52/bin/mysqlsecureinstallation but I also get ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO). I had the same problem just now.
If you brew info mysql and follow the steps it looks like the root password should be new-password if I remember correctly. I was seeing the same thing you are seeing. Helped me the most.
It turned out I didn't have any accounts created for me. When I logged in after running mysqldsafe and did select. from user; no rows were returned. I opened the MySQLWorkbench with the mysqldsafe running and added a root account with all the privs I expected. This are working well for me now.
I had the same issue after I tried to restart mysql. I use the following two aliases in my.profile for convenience alias mysql-stop='launchctl unload /Library/LaunchAgents/homebrew.mxcl.mysql.plist' alias mysql-start='launchctl load /Library/LaunchAgents/homebrew.mxcl.mysql.plist' After stoping mysql and then trying to restart I experienced the issue you were having. I looked into the launchctl load and it was reporting a “nothing found to load” error. After a quick search I found this. So I updated me mysql-start alias as follows alias mysql-start='launchctl load -w -F /Library/LaunchAgents/homebrew.mxcl.mysql.plist' This solved my issue which may be useful for you. Here is an update for MySQL 5.7 bash -version GNU bash, version 4.4.12(1)-release (x8664-apple-darwin17.0.0) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I'm seeing the following error. OSX Sierra 10.12.6 ? /usr/local/Cellar/mariadb/10.2.14: 641 files, 170MB 03392m n+ Starting MariaDB. 0330m Service `mariadb` already started, use `brew services restart mariadb` to restart. 03392m n+ Resetting Root password for MariaDB. 0330m 03392m Press ENTER when prompted. 0330m Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 03392m n+ Creating burstwallet db.
0330m ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 03392m+ Database created successfully. 0330m 03392m n+ Installing Java 8 JDK. 0330m after that the java process does not start, a manual run produces the following Apr 08, 2018 11:08:53 AM brs.Burst loadProperties INFO: Initializing Burst Reference Software (BRS) version 2.0.3 Apr 08, 2018 11:08:53 AM org.ehcache.core.EhcacheManager createCache INFO: Cache 'account' created in EhcacheManager. INFO 2018-04-08 11:08:53 brs.db.sql.Db - Using mariadb Backend SEVERE 2018-04-08 11:08:53 brs.Burst - java.lang.RuntimeException: Invalid database charset utf8utf8mb4utf8utf8mb4(MariadbDbs.java:23) at brs.db.sql.Db.getDbsByDatabaseType(Db.java:120) at brs.Burst.loadWallet(Burst.java:197) at brs.Burst.init(Burst.java:176) at brs.Burst.main(Burst.java:157) Caused by: java.lang.RuntimeException: Invalid database charset utf8utf8mb4.