LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-10-2003, 12:25 AM   #1
Nay
Member
 
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?

thanks,

-Nay
 
Old 11-10-2003, 04:31 AM   #2
unholy
Member
 
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
Looking_Lost
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;
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 PM.

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