LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-04-2004, 02:50 AM   #1
markopolox
LQ Newbie
 
Registered: Sep 2003
Posts: 12

Rep: Reputation: 0
MYSQL Beginner...


I guess I want to start from the beginning.


I take it that in this command:

mysqladmin -u root password yourrootsqlpassword

root: Is not the linux root super user correct?
yourrootsqlpassword: Is anything you want to make up?

My question is how do you test that account?
It seems all I have to do is type $mysql
and I get the prompt. How do I secure this:

Your MySQL connection id is 24 to server version: 4.0.21-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

How can I make sure that root and it's password work is what I'm trying to say. Is there a command or test I can run....

Sorry really new and willing to break mysql just so I can learn a thing or two?

Last edited by markopolox; 11-04-2004 at 03:00 AM.
 
Old 11-04-2004, 03:10 AM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
root in Mysql refers to the administrative user of the DBA. ie the DB administrator. It's not the same thing as Linux root (the overall system administrator).

Every mysql db has a set of system tables (db,columns_priv, tables_priv etc) associated with security. SQL commands like GRANT and REVOKE will alter these tables, athough you can directly manipulate them via UPDATE/INSERT/DELETE. Look up the official MySQL docs for more info.
 
Old 11-04-2004, 07:45 PM   #3
sheds
Member
 
Registered: Oct 2004
Location: Costa Rica
Distribution: Mandrake 9.1
Posts: 30

Rep: Reputation: 15
I guess you started at switching user to root.

su root (type password)

If you didn't download it, then it's in one of your disto's CD, like mine. In which case, you just type "urpmi mysql". Then follow instructions. Surf to directory /etc/rc.d/init.d/ and type "mysql restart". Then type "mysqladmin -u root password 'whateverpassword'". This is as far as i got, cause when i try the next steps, the password i typed doesn't work.

mysql -u root -p
mysql> create database mydb;
mysql> grant select, insert, delete, update, create, drop, index
on mydb.* to
myuser identified by 'hello';
mysql> flush privileges;
mysql> \q

Here's the link so you get more info about this.

http://vsbabu.org/mt/archives/2003/0...ndrake_91.html
 
  


Reply



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. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
PHP-Mysql Tutorial for beginner/dummies ewinandar Programming 1 11-10-2004 02:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:58 AM.

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
Open Source Consulting | Domain Registration