Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-10-2003, 12:25 AM   #1
Registered: Oct 2003
Distribution: Windows XP Pro & RedHat 9 Dual Boot
Posts: 32

Rep: Reputation: 15
editing mysql information

hey, i installed apache, php and mysql from the redhat cds (under the websever package) it works fine but I want to edit the mysql information. basicly, i don't want to be using root and no password as my log in.

where do i edit the default username and password for mysql?


Old 11-10-2003, 04:31 AM   #2
Registered: Sep 2003
Location: Eire
Distribution: Ubuntu 7.10
Posts: 344

Rep: Reputation: 30
From my little sql experience, I do know that the password that sql asks you for is not the root password.

You set this yourself, and it doesn't have to be the same as the root password. I don't know whether or not you also have to be root.
Old 11-10-2003, 04:44 AM   #3
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
you can add a user to mysql that has mysql root/admin privileges for a specificsdatabase as mysql root ie.

use mysql;

Grant all on unholys_database to unholy@'localhost' identified by 'some_password_or_other';

flush privileges;

It's a good idea to add a password for mysql root though and delete the "blank" user if you haven't already done so

use mysql;

delete from user where user=''; (two apostrophes)

flush privileges;

add a password for root

use mysql;

update user set password=PASSWORD('whatever_password') where user ='root';

flush privileges;


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
Getting more information while editing / answering JZL240I-U LQ Suggestions & Feedback 11 03-15-2005 09:29 AM
Courier-Imap + MySQL authmysqlrc passthrough editing of fields chakkerz Linux - Networking 0 03-10-2005 07:32 PM
software for adding cddb information into a local mysql database jacksonscottsly Linux - Software 1 07-09-2004 10:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration