LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-25-2001, 07:52 PM   #1
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Rep: Reputation: 30
MySQL configuration


I'm having a little trouble setting up MySQL database on my computer running Redhat 7.0. I downloaded the rpm file for the server and the client, and installed them successfully. The guide that came along with it doesn't really give any instructions for th rpm installation and configuration. The rpm installs successfully, and I can use the database manually from the shell, but I haven't set up the config files(I don't know what or where they are), so when I try to connect through java, it says can't connect because server's configuration denies access to data source. I'm guessing this is the default configuration. If anyone knows how to configure the server, please give me some ideas.

Thanks.
 
Old 06-26-2001, 12:15 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Re: MySQL configuration

Quote:
Originally posted by oulevon
I'm having a little trouble setting up MySQL database on my computer running Redhat 7.0. I downloaded the rpm file for the server and the client, and installed them successfully. The guide that came along with it doesn't really give any instructions for th rpm installation and configuration. The rpm installs successfully, and I can use the database manually from the shell, but I haven't set up the config files(I don't know what or where they are), so when I try to connect through java, it says can't connect because server's configuration denies access to data source. I'm guessing this is the default configuration. If anyone knows how to configure the server, please give me some ideas.

Thanks.
Who are you trying to connect as?
 
Old 06-26-2001, 03:02 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
I follow mcleodnine's path - have you added any users to the database? By default you will only have root@localhost hence any attempt to connect to it as another user, even root@hostname where hostname is the machine with the database on will fail... Have a look at the section in the manual about adding users. As for the config files, I dunno about the RPM but when I did a source install it didn't create the config files, you just create them in /etc/my.cnf if you need to set anything.

HTH

Jamie...
 
Old 06-26-2001, 08:10 AM   #4
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
I was trying to follow the guide. I screwed up something. Now if I type mysql at the prompt (this worked fine yesterday) I get the following error:
Error 1045: Access denied for user: 'root@localhost' (Using password: NO)

I've been trying to find in the manual how to delete this but no such luck. I can't get back into mysql to change anything. It won't let me access it.
 
Old 06-26-2001, 03:05 PM   #5
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
If you set a password and remember it hope is not lost, elsewise you'll just have to remove/reinstall mysql.

If you remember the pword just login with the -p option and it'll prompt you for a password.

J
 
Old 06-26-2001, 03:27 PM   #6
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
How do I go about removing it or reinstalling it? I don't want to screw this up again.
 
Old 06-26-2001, 04:10 PM   #7
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Have you thought about removing the files that hold the databases (on my system in /usr/local/var but may be something like /usr/local/mysql/var on yours or maybe /var/lib/myslq/??? (rpm I think)) using the old rm -rf * monster (be careful!!) then creating the initial databases again by running mysql_install_db

HTH

Jamie...
 
Old 06-26-2001, 04:22 PM   #8
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
That definitely crossed my mind. Very tempting. I was just worried I might delete something I shouldn't. That might be my only alternative though. On my system they're in /var/lib/mysql/mysql
Should I delete it all? There are about 15 files in there.
Thanks for your help
 
Old 06-26-2001, 04:24 PM   #9
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
If it doesn't work at the moment, and you're going to remove it all then reinstall anyway - what have you got to lose?? You should have the following:
Code:
columns_priv.MYD  db.MYD  func.MYD  host.MYD  tables_priv.MYD  user.MYD
columns_priv.MYI  db.MYI  func.MYI  host.MYI  tables_priv.MYI  user.MYI
columns_priv.frm  db.frm  func.frm  host.frm  tables_priv.frm  user.frm
Yeah? Or something around that mark.

Jamie...
 
Old 06-26-2001, 04:30 PM   #10
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Okay, I did it. I then logged out and then came back to give it a try. Access still denied. So in /var/lib/mysql I deleted a .sock file which really screwed everything up since now I get a connection error, and can't even get it started. I think it's time to start over. Is there a trick to removing the files, or do I have to do it all manually?

Thanks again for your prompt help.
 
Old 06-26-2001, 04:35 PM   #11
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
You will want to use rpm to remove the package otherwise I think you'll screw its database of install packages... I'm not of the Redhat camp so the best I can offer is RTFM - man rpm

Jamie...
 
Old 06-26-2001, 04:38 PM   #12
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Thanks again for all your help. I'll remove it and then give it another go tonight. I'll let you know how I make out. By the way, do you think MySQL is the best database to use ( in terms of ease)? I will only be using it along with java(jdbc) for some basic programs, nothing too big? Thanks again for your help.
 
Old 06-26-2001, 04:45 PM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
I've used it a reasonable about with PHP and really like it but never with jdbc although I've got a friend who is a serious Java hacker (I keep trying to get him to take medication for this) and he loves it so I imagine it must be good. I can't honestly say that I've tried the other GPLd/free dbs out there though.

If you're thinking of getting a book on MySQL I advise you to steer clear of O'Reilly's offering... I've got a shelf full of O'Reilly books and they all amazing, apart from this one, which makes it a real let down.

Jamie...
 
Old 06-26-2001, 05:57 PM   #14
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
I have a book on Java programming on linux, and it strongly recommended MySQL. Thanks for your advice on the book. That's too bad. O'Reilly usually puts out very good books. Thanks again for all your help. I'm about to retackle the installation.
 
Old 06-26-2001, 11:55 PM   #15
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Well, I'm up and running now. jharris thanks for all your help. I even have my program running now using the database. I'm going to have to look into learning a bit of sql though. Thanks for your help again.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql configuration klemen *BSD 3 08-19-2005 12:00 AM
openldap configuration with mysql javier_ccs Linux - Software 1 07-06-2005 10:56 AM
Mysql 4.1 and PHP configuration? sikandar Linux - Software 2 05-30-2005 10:08 PM
MySQL 4.0.13-0 Configuration Help Please Nick2k3 Linux - Software 6 07-02-2003 10:00 PM
MySQL configuration... needamiracle Linux - Software 0 07-22-2002 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:29 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