|
|||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
mySQL: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
I am new to terminal and I am having trouble setting up MySql. I've installed it step by step and run mysql_install_db, but I'm having trouble connecting as root user.
Code:
My-Computer:/usr/local/mysql/bin saraparkinson$ ./mysql -uroot mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) Code:
/usr/local/mysql/bin/mysql I wanted to be able to add a database with: Code:
My-Computer:/usr/local/mysql/bin saraparkinson$ ./mysqladmin -uroot create book_db ./mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' Thanks in adv. |
|
|
|
#2 |
|
Triple-A Player
Join Date: Aug 2004
Posts: 200
|
It indicates that root has a password, but you are not supplying it, hence the (Using password: NO)
try using mysql -u root -p The -p will make it prompt you for a password. |
|
|
|
|
|
#3 |
|
Registered User
Join Date: Aug 2006
Posts: 1
|
Edit config.inc.php this can be found in phpMyAdmin/libraries
change : $cfg['PmaAbsoluteUri'] = ''; to $cfg['PmaAbsoluteUri'] = 'localhost/phpmyadmin/'; change $cfg['Servers'][$i]['host'] = 'localhost'; to $cfg['Servers'][$i]['host'] = 'Localhost'; and enter you're password in : $cfg['Servers'][$i]['password'] = ''; eg $cfg['Servers'][$i]['password'] = 'password'; reboot MySQL |
|
|
|
|
|
#4 |
|
Triple-A Player
Join Date: Aug 2004
Posts: 200
|
Why, oh why, would you tell someone to reboot MySQL after making a change to the PhpMyAdmin config sheet?
And what does a web based php MySQL admin panel have to do with not being able to access MySQL via terminal? Are you sure that you posted to the correct topic? |
|
|
|
|
|
#5 |
|
Registered User
Join Date: May 2007
Posts: 1
|
thank you navaho,
you saved my day
|
|
|
|
|
|
#6 |
|
Registered User
Join Date: Aug 2007
Posts: 1
|
1045..
Hi, I had MySQL installed and working. I could log onto my server perfectly fine, but after my computer had been reset I received the error, as if SOMETHING had changed over night... I have no idea how to fix this. I’ve read forums and found nothing that helps. Any thoughts?
|
|
|
|
|
|
#7 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,050
|
Generally we don't dredge up year-old threads to deal with new problems (esp. as this one's been brought back once already)
You should start a new thread detailing what you had working, and exactly what you are doing, including detailed error messages. When you say your computer was 'reset' what does that mean? reboot? software restore? update? |
|
|
|
|
|
#8 | ||||||||||||||||||||||||||||||||||||||||||||||
|
Registered User
Join Date: Sep 2007
Posts: 1
|
I have been fighting with MySQL and phpMyAdmin for a LONG time. I juat got a shiny new iMac and took another run at it. I got all kinds of errors trying to access the database (command-line and php). MySQL and php forums are full of help that is anything but. Then I found these posts. I kept trying to login like I would to Sybase. MySQL != Sybase. I also FINALLY got phpMyAdmin to work. I know the post makes no sense with respect to the rest of the postings, but it did turn out to be exactly what I needed to make that heap work. I somehow made it work a few years back, and then could never get it to work on any other computer or any other version of phpPleaseFindMyDatabaseAndWorkDamnit. So thank you to both of you |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
#9 | |||||||||||||||||||||||
|
Registered User
Join Date: May 2009
Posts: 1
|
I just had to register to say this, than you very much, had this problem and thanks to you Gido, it is gone
|
|||||||||||||||||||||||
|
|
|
|
|
#10 |
|
Registered User
Join Date: Jul 2009
Posts: 1
|
got this problem today after upgrading my linux box.
If you dont wont to hardcode the password, but instead have login, just uncomment this line: $cfg['Servers'][$i]['auth_type'] = 'cookie'; // I also had to change the server from "localhost" to "Localhost"... hope this helps, basse |
|
|
|
|
|
#11 | |||||||||||||||||||||||
|
Registered User
Join Date: Oct 2009
Posts: 1
|
HAving a problem with mysql config
hi
i tried to confi mysql with php error: error: 'Access denied for user: 'root@localhost' (Using password: NO)'[/code] i m using windows xp.how u solved that problem.i did whatever answered u got.but i m getting same error. thanks
|
|||||||||||||||||||||||
|
|
|
|
|
#12 |
|
Guest
Posts: n/a
|
hello,
please can anyone help me, i am trying to start a site with my sql, i understand the whole table thing and the database and all that, the only thing i dont get is the connect, i dont get what the **** your suppose to put when connecting $con = mysql_connect(hostname,username,password) OR DIE ('Unable to connect to database! Please try again later.' see this line, i have tryied everything i can think of, but the instructions say not to use local host, so what the f***k am i suppose to use, ive tried everyserver name and number i have, and then i try to do it with the dreamweaver , and nothing, can you please help, i dont know what to do and im stuck, i have tried to look it up online but they just tell me to use local host, i am using phpmyadmin, php5 , please if you can reply let me know via email, gustavoruiz@ubuildurbiz.com.. thank you for your time |
|
|
|
#13 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,050
|
First problem I see is this:
$con = mysql_connect(hostname,username,password) 'hostname' should perhaps be $hostname, and defined earlier. Question 1: is your development website hosted on your own computer? (if you are using a web hosting company we can stop here - call that company for support.) Question 2: How and where did you install MySQL? (it doesn't come with OSX) |
|
|
|
|
|
#14 | |||||||||||||||||||||||
|
Guest
Posts: n/a
|
O MHUY GOD! you saved my private servers!
|
|||||||||||||||||||||||
|
|
|
#15 | |||||||||||||||||||||||
|
Prospect
Join Date: Jul 2011
Posts: 7
|
Are you using a cloud service because I plugged in the same thing and got nothing.... |
|||||||||||||||||||||||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|