Mac OS with MySQL, phpMyAdmin
Moderator: General Moderators
Mac OS with MySQL, phpMyAdmin
I've just installed MySQL and phpMyAdmin on my PowerBook running OS X 10.4.3. On the command line, the mysql command is not even recognized. In phpMyAdmin, the main page says "#1045 - Access denied for user 'root'@'localhost' (using password: NO)". Any ideas on how to connect?
Thanks,
Jason
Thanks,
Jason
In the config file for phpMyAdmin, you can type in the credentials you need. The best way (IMO) is to set up the config file to use http authentication right to mysql. That way you don't have to store database passwords anywhere.
You may need to put the mysql command in your path so it can auto complete. Do a search for 'mysql' and see if the directory it's in is in your path. If not, just call 'mysql' with the fill path name and it should work.
You may need to put the mysql command in your path so it can auto complete. Do a search for 'mysql' and see if the directory it's in is in your path. If not, just call 'mysql' with the fill path name and it should work.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Is the config file config.inc.php? That file actually didn't exist on my computer until I created it. If not, where is the config file? How do I set up the config file to use http authentication right to mysql?in the config file for phpMyAdmin, you can type in the credentials you need. The best way (IMO) is to set up the config file to use http authentication right to mysql. That way you don't have to store database passwords anywhere.
How do I put the mysql command in my path? I've tried using the mysql command from the directory in which mysql is installed, but that didn't work.You may need to put the mysql command in your path so it can auto complete. Do a search for 'mysql' and see if the directory it's in is in your path. If not, just call 'mysql' with the fill path name and it should work.
Thanks,
Jason
The config file has to exist for phpMyAdmin to run. If it wasn't there, then maybe you've got a buggered installation.
As for putting mysql in your path, it's kind of a moot point if you can't even run mysql from the directory it's stored in.
Re-install phpmyadmin and see what happens.
As for putting mysql in your path, it's kind of a moot point if you can't even run mysql from the directory it's stored in.
Re-install phpmyadmin and see what happens.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Okay, I made some progress. I re-installed phpMyAdmin. Turns out there was some stuff I was supposed to do that I didn't do last time, such as create a config file. Before, when I was going to localhost/phpMyAdmin/main.php, it was telling me I needed to make a config file, but I didn't know what it was talking about. Since then, I've figured it out. Now it's telling me this:
I don't know how to set or check a user/pass for my MySQL server. How do I do that?
Thanks,
Jason
I'm still getting the same "#1045 - Access denied for user 'control_user'@'localhost' (using password: YES) " as before.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.
I don't know how to set or check a user/pass for my MySQL server. How do I do that?
Thanks,
Jason
Well, good progress
.
The default root password is blank I think, so mysql -u root should get you in correct? In the config file, set the 'auth_type' to 'http'. That should let you login using the credentials stored in mysql. Once in, create a new user and set a password. You should set a password for the root user as well.
The default root password is blank I think, so mysql -u root should get you in correct? In the config file, set the 'auth_type' to 'http'. That should let you login using the credentials stored in mysql. Once in, create a new user and set a password. You should set a password for the root user as well.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Code: Select all
<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.8.0.2 setup script by Michal ?~Liha?~Y <michal@cihar.com>
* Version: $Id: setup.php,v 1.23.2.2.2.1 2006/03/08 19:06:48 nijel Exp $
* Date: Thu, 30 Mar 2006 06:00:08 GMT
*/
/* Servers configuration */
$i = 0;
/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'control_user';
$cfg['Servers'][$i]['controlpass'] = 'themoms';
#$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'themoms';
/* End of servers configuration */
$cfg['LeftFrameLight'] = true;
$cfg['LeftFrameDBTree'] = true;
$cfg['LeftFrameDBSeparator'] = '_';
$cfg['LeftFrameTableSeparator'] = '__';
$cfg['LeftFrameTableLevel'] = 1;
$cfg['LeftDisplayLogo'] = true;
$cfg['LeftDisplayServers'] = false;
$cfg['LeftPointerEnable'] = true;
$cfg['EditInWindow'] = true;
$cfg['QueryWindowHeight'] = 310;
$cfg['QueryWindowWidth'] = 550;
$cfg['QueryWindowDefTab'] = 'sql';
?>