Advertisement

Help with MySQL and Ubuntu

Started by November 15, 2005 06:19 PM
7 comments, last by erissian 18 years, 11 months ago
I am trying to set up a MySQL account in Ubuntu, with the MySQL control center. I tried to set it up as root@localhost but when I try to connect it gives me an error saying access is denied for user 'root@localhost' Using password No. Im very ne at ubuntu and mysql. If anyone can help me to set it up it would be greatly appreciated. thanks
If you insist on saying "DUH", try to make a post that makes a little more sense
Hi,

did you follow the installation instructions how to setup the "root" password for it?
how did you start mysql ?
mysql -u root
or
mysql -u root -p
?
try :
mysql -u root -pyourpasswordhere ( reall without the space between the p and your password)
Excuse my english, I am only German
Advertisement
I have tried logining like that, mysql -u root. I have tried to set up a password for it, but I'm not sure it worked. Do I use mysqladmin? I'm not sure if I found the right instructions. They should be on the ubuntu guide right?

Edit: is this it? mysqladmin -u root password whatever
If you insist on saying "DUH", try to make a post that makes a little more sense
Quote: Original post by cybergolem
mysql -u root -pyourpasswordhere ( reall without the space between the p and your password)

Typing your password on the prompt is often a bad idea. Most shells log the commands you type to a file, which is not where you want passwords to roam.
Using mysql -u root -p will ask you for the password.
Quote: Original post by BBB
[rant]
Ubuntu doesn't have a root account, which is a bit stupid since it forces users never to run as root. It is a very goog idea to limit the usage of the root account but it is handy sometimes and forcing users to use/not use stuff X is a philosophy that should stay in the windows world.
[/rant]

Try: "sudo su" as the sudoer account. You can then give root a password if you like so that it can be used normally.
I tried all of that and it still says Access denied for user 'root@localhost'.
I dont think i have a password set up for root though. in Mysql i mean, I don't know what it would be, I tried the password for logging into the computer but that doesn't work.

Edit - is there a way i can just uninstall mysql and try to install it again?
If you insist on saying "DUH", try to make a post that makes a little more sense
Advertisement
Does anyone know why I can't login to Mysql. I have gone over every stupid tutorial and all I get is the same damn thing.

Access Denied for root@localhost

I can't set the password for root.

mysqladmin -u root password admin

same damn thing

Access Denied for root@localhost

ive tried sudo

sudo su

login in as root

doing it with my other user account, nowhere on the internet or google can I find anything. Im really getting pissed off. So if anyone cane help, it would greatly be appreciated. Thanks
If you insist on saying "DUH", try to make a post that makes a little more sense
Whoever said that you should use "su" or "sudo" is a little confused. The root user in MySQL is not the same as the system root user. The simple answer to the question (provided MySQL is setup correctly) is: mysql -u root -p
A common problem when install mysql, and one that I still do nearly every time I install it, is to set up the database as root. mysql likes to run as the mysql user, and it won't have proper access to the files it needs. Running it as root is dangerous.

Your best bet is to delete the /var/lib/mysql directory, and then "su mysql". After that you can run mysql_install_db as mysql, and it should work smoothly from there.

Another common problem is that in /etc you may have several sample mysql config files. Rename one of them to my.conf
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)

This topic is closed to new replies.

Advertisement