Page 1 of 3
mySQL error 1045
Posted: 20 Jul 2018, 01:25
by jabohn
I've installed
mySQL on my iMac and I'm using the instructions to set it up for MrMC. I'm in the terminal and I can't even get past the first command:
sudo /usr/local/
mysql/bin/
mysql
I enter my password and I get this:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Any ideas?
I assume the requested password is my computer account's password.
Re: mySQL error 1045
Posted: 20 Jul 2018, 01:44
by timstephens24
Re: mySQL error 1045
Posted: 20 Jul 2018, 01:49
by jabohn
Thanks. I got further but now there's another error:
sudo cp my-huge.cnf /etc/my.cnf
cp: my-huge.cnf: No such file or directory
Re: mySQL error 1045
Posted: 20 Jul 2018, 07:59
by amet
ls /usr/local/
mysql/support-files/
What does ^^^ give you?
Also, pastebin the entire terminal output when you get an error to give us a chance to try to help you... one liners don’t have enough info
Re: mySQL error 1045
Posted: 20 Jul 2018, 15:56
by jabohn
This is what I get Amet:
Last login: Thu Jul 19 20:59:06 on ttys000
jMac:~ jabohn$ ls /usr/local/
mysql/support-files/
magic
mysql.server
mysql-log-rotate mysqld_multi.server
jMac:~ jabohn$
jMac:~ jabohn$
Re: mySQL error 1045
Posted: 20 Jul 2018, 21:12
by timstephens24
MySQL on the Mac doesn't use a my.cnf file by default, so it's not downloaded in the support-files folder. You can't copy a file that doesn't exist is basically what the error is telling you :p
It should be listening on 3306 and 33060 on all interfaces I believe. What's the output of this command:
Code: Select all
sudo lsof -n -P -i4TCP | egrep "3306"
Re: mySQL error 1045
Posted: 20 Jul 2018, 21:47
by jabohn
Here you go... (side note: I guess the Mac instructions on the wiki aren't exactly correct)
Code: Select all
Last login: Fri Jul 20 08:54:53 on ttys000
jMac:~ jabohn$ sudo lsof -n -P -i4TCP | egrep "3306"
Password:
mysqld 82959 _mysql 19u IPv6 0x13e9f6212ff1a6b3 0t0 TCP *:3306 (LISTEN)
mysqld 82959 _mysql 22u IPv6 0x13e9f6212ff1a0f3 0t0 TCP *:33060 (LISTEN)
jMac:~ jabohn$
Re: mySQL error 1045
Posted: 20 Jul 2018, 22:09
by timstephens24
Try connecting from inside MrMC Settings -> Services ->
MySQL and see what happens. If that doesn't work I'll load up
mysql on my Mac and take a look.
Re: mySQL error 1045
Posted: 21 Jul 2018, 00:44
by jabohn
Okay, well I gave it a shot but the guide doesn't even say what to do on MrMC. I put in my computer's IP for the address and put in the password I created when installing
mySQL but at no point did
mySQL prompt me to create a username so I just put root. Anyway, it didn't work and MrMC said to check my settings.
Re: mySQL error 1045
Posted: 21 Jul 2018, 00:52
by timstephens24
You need to run these commands:
Code: Select all
/usr/local/mysql/bin/mysql -u root -p
<Insert MySQL root password>
CREATE USER 'mrmc' IDENTIFIED BY 'mrmc';
GRANT ALL ON *.* TO 'mrmc';
exit
What that will do is log in to your
MySQL database as root, create a user named mrmc with a password of mrmc and then exit.
In MrMC set the user name to mrmc and the password to mrmc and put in the IP of your Mac. Leave the port and the names of the databases at the default value and then try to enable it.