Forum Moderators: travelin cat
Great, or at least it would be if I could connect to MySQL through phpMyAdmin or any other means as I don't know the password for the root account. I am new to macs so I don't know where to find this out. In Windows I could just check the my.ini file and all would be fine but, I can't find the mac equivalent. Searching the net the answer has so far proved fruitless.
any ideas?
[sunsite.mff.cuni.cz...]
To get to your command line, just open Macintosh HD --> Applications --> Utilities --> Terminal
Let us know if this works
-- Zak
<Added>
coopster, you beat me to it!
</added>
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
MySQL said: Documentation
#1045 - Access denied for user: 'root@localhost' (Using password: NO)
--
but if I change config.inc.php so the username is for example 'xyz' I can get to view the proper screen for phpMyAdmin and not the error splash screen. Witht he messages
MySQL 4.0.20-standard running on localhost as xyz@localhost
Create new database Create new database: Documentation
No Privileges
-- Could this be that although MySQL is on the machine all databases have been deleted including the user table?
IMO If that doesn't work, it may be easiest to start with a fresh install of MySQL.
To uninstall I use entropy.ch's script, found Here [entropy.ch]
On that same site you will find pretty detailed explainations of the install process, removing old versions of MySQL and what is required.
Sorry to not be of much help here, but a fresh MySQL install 'should' only take 20 minutes. Of course if you can't access MySQL to do a data dump, you will lose any databases if you had any.
-- Zak
2) mysql folder:
This folder has to be at least writeable by the mysql user/group. Thus, it's very common for this folder not to be accessible by anyone else but mysql. You can change this if you wish to allow both you and mysql to access the folder.
The best option for you is to follow the instructions in the third part of the problem solving as described on the dev.mysql.com page previously referenced.
Now,!how! does mysql start on your system? Do you have a MySQL in /Library/StartupItems or /System/Library/StartupItems? I know of at least three different distributions of MySQL so we do need to know which one you've got installed in order to help you further.
Do you have a MySQL PreferencePane?
To solve your problems you'll have to delve into the arcane art of using Terminal. phpmyadmin is completely unable and unsuitable to solve this problem.
Further questions:
1) do you have any experience with Terminal?
2) do you have BBEdit installed?
3) what's the location of your mysql data folder?
4) in Terminal, what result do you get from this command : sudo find / -name 'mysqld_safe'
5) in Terminal, what result do you get from this command : echo $PATH
the mac guy is coming in today to have a look at it; with the most likely outcome being a complete format and reinstalling of OS X on my system.
I think this started out as a password issue but, due to my inexperience with Macs and my explorative nature, the problem has gotten increasingly worse.
I set the root password to blue and then set up the relevant username/password/hostname combo in phpmyadmin's config.inc.php file but, i was still getting errors when connecting.
When i tried to change the root password from blue to red I was told that the blue password was incorrect so I tried blue' (with an apostrophe) and it worked to change the password . p.s. this isn't ecause I have copied and pasted the password complete with apostrophe. This little apostrophe is coming from nowhere.
In phpmyadmin if I use the password followed by the apostrophe I get nowhere either. Could my machine be chnaging my password as soon as I create it?
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('your_password')
-> WHERE Host = 'your_host' AND User = 'user_name';
mysql> FLUSH PRIVILEGES;
-- Zak
When I reinstalled MySQL i set the root password by copying the password from a text file which seemed to work fine and the password "dots showed up" in the password field and when I clicked set password it all worked fine. I have since learnt that in OS X you cannot copy and paste passwords so does that mean that I have a password made up of those "little password dots"?